• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Want to know more about this trigger

Status
Not open for further replies.
Level 1
Joined
Mar 28, 2018
Messages
4
Hi guys, so I need help to find a trigger. Well, I was searching for some 'anti cheats' for my project and found this map:
圣灵ⅡORPGv1.00J - Warcraft 3 Maps - Epic War.com

It's a TWRPG chinese

When you try to cheat some item (specifically with -spawn command from a CP) and pick it up it just doesn't count any status (damage, agi etc) it seems like the item just doesn't exists but when you drop it from a monster the status (damage, agi etc) do count just fine also when you craft works just fine. Basically that's it... I wanna know where's this trigger because I couldn't find it myself, it's written in JASS. I don't want to copy, I just wanna learn from it and so do my own code also I found it very interesting since I've never seen something like this before.

Thanks guys!
 
Last edited:

Rheiko

Spell Reviewer
Level 26
Joined
Aug 27, 2013
Messages
4,214
You will need dummy items with exact description as the original but don't give any stats. Check if the player gets the item from chat command, if yes, give the dummy items. If it's dropped by monster or crafted, give the real item. Can't provide more info because it depends on your map but you should get the point.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
I am guessing it is because the -create cheat does not register the item with the custom item system. All items are dummies with the custom item system modifying the holding unit's stats as appropriate. When an item drops or is crafted it gets registered with the custom item system. On the other hand if it magically appears, eg via a cheat command, it does not so does not function.
 
Level 13
Joined
May 10, 2009
Messages
868
The map code is obfuscated. Though, you can still open the map, and see its object editor data. Well, almost all items have no damage, armor, movement speed, attack speed bonuses attached to them. The map author is working with a hash table and a bonus mod system. Then, when the map initializes, he/she linked the amount of bonuses to the item through a table.

Example:
JASS:
// When map initializes
call Equipment_to_build_A('spsh',2,0,$8C,0,0,0,0,5000,0,0,0,100) // 8C = 140 decimal number

// Equipment_to_build_A function
function Equipment_to_build_A takes integer itemid,integer yOv,integer yRv,integer yIv,integer yAv,integer yNv,integer ybv,integer yBv,integer ycv,integer yCv,real ydv,real yDv,integer yfv returns integer
    set LasBuildEquipId=itemid
    call SaveInteger(BYHT,Equip_Type_t,itemid,yOv) // This is probably some sort of item classification (shield, weapon, boots, gloves, etc)
    call SaveInteger(BYHT,Equip_Attack_t,itemid,yRv) // Damage
    call SaveInteger(BYHT,Equip_Armor_t,itemid,yIv) // Armor
    call SaveInteger(BYHT,Equip_Str_t,itemid,yAv) // Strength
    call SaveInteger(BYHT,Equip_Agi_t,itemid,yNv) // Agility
    call SaveInteger(BYHT,Equip_Int_t,itemid,ybv) // Intelligence
    call SaveInteger(BYHT,Equip_ASPD_t,itemid,yBv) // Attack Speed
    call SaveInteger(BYHT,Equip_HP_t,itemid,ycv) // Health Bonus
    call SaveInteger(BYHT,Equip_MP_t,itemid,yCv) // Mana Bonus
    call SaveReal(BYHT,(Equip_HpRegen_t),itemid,ydv) // Health Regeneration
    call SaveReal(BYHT,(Equip_MpRegen_t),itemid,yDv) // Mana Regeneration
    call SaveInteger(BYHT,Equip_Lv_t,itemid,yfv) // Probably the minimum required level a hero must be in order to carry this item
    return itemid
endfunction
Based on that information, we can conclude that we were looking at a specific item type, and it's raw code is: 'spsh'

If you look for that raw code in the object editor, you'll find this item:
Untitled-2.png


As you can see, everything is being handled through triggers. The item itself is empty when it comes to giving bonuses.
 
Status
Not open for further replies.
Top