wc3edit.net

United Warcraft 3 map hacking!
It is currently April 20th, 2024, 5:04 am

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: August 15th, 2014, 11:37 pm 
Offline
Member
User avatar

Joined: August 18th, 2013, 4:48 pm
Posts: 90
Location: Vampire Hunting
Title: The Day Walker
i play rpgs quite a bit, (particularly korean ones) however not always are items blatantly clear in how to craft if there is a crafting system, so i'd like to know how to find the triggers in jass.

For Example , say player 1 said "-create" and had item A + B in inventory this gives him item C
and later item C + D then he said "-create" again made item E
how would one find this in jass? (if i can, if not any alternatives?)



*Thanks to anyone whom can help*


Top
 Profile  
 
PostPosted: August 16th, 2014, 8:33 pm 
Offline
Forum Staff
User avatar

Joined: November 17th, 2008, 3:49 pm
Posts: 610
The way i go about it is searching the jass for the -create command. For korean maps though, the command may not be completely in english and jasscraft cant search unicode. In that case start the search with PlayerChatEvent till you come across the command. What you're looking for should be right under, or pretty close to that line. You're mainly looking for the lines that remove and add items.

For an example, here is what it looks like for Greed RPG.
Spoiler:
Code:
function InitTrig_roon10 takes nothing returns nothing
set gg_trg_roon10=CreateTrigger()
call TriggerRegisterPlayerChatEvent(gg_trg_roon10,Player(0),"-ì¡°í•©",true)
call TriggerRegisterPlayerChatEvent(gg_trg_roon10,Player(1),"-ì¡°í•©",true)
call TriggerRegisterPlayerChatEvent(gg_trg_roon10,Player(2),"-ì¡°í•©",true)
call TriggerRegisterPlayerChatEvent(gg_trg_roon10,Player(3),"-ì¡°í•©",true)
call TriggerRegisterPlayerChatEvent(gg_trg_roon10,Player(4),"-ì¡°í•©",true)
call TriggerRegisterPlayerChatEvent(gg_trg_roon10,Player(5),"-ì¡°í•©",true)
call TriggerRegisterPlayerChatEvent(gg_trg_roon10,Player(6),"-ì¡°í•©",true)
call TriggerRegisterPlayerChatEvent(gg_trg_roon10,Player(7),"-ì¡°í•©",true)
call TriggerRegisterPlayerChatEvent(gg_trg_roon10,Player(8),"-ì¡°í•©",true)
call TriggerAddAction(gg_trg_roon10,function Trig_roon10_Actions)
endfunction
function Trig_roon9_Func001C takes nothing returns boolean
if(not(UnitHasItemOfTypeBJ(udg_unitUserHero[GetConvertedPlayerId(GetTriggerPlayer())],'ciri')==true))then
return false
endif
if(not(UnitHasItemOfTypeBJ(udg_unitUserHero[GetConvertedPlayerId(GetTriggerPlayer())],'I01B')==true))then
return false
endif
return true
endfunction
function Trig_roon9_Actions takes nothing returns nothing
if(Trig_roon9_Func001C())then
call RemoveItem(GetItemOfTypeFromUnitBJ(udg_unitUserHero[GetConvertedPlayerId(GetTriggerPlayer())],'ciri'))
call RemoveItem(GetItemOfTypeFromUnitBJ(udg_unitUserHero[GetConvertedPlayerId(GetTriggerPlayer())],'I01B'))
call UnitAddItemByIdSwapped('I01M',udg_unitUserHero[GetConvertedPlayerId(GetTriggerPlayer())])
call DisplayTimedTextToPlayer(GetTriggerPlayer(),0,0,3.00,"[조합]9급룬을 조합하였습니다.")
else
endif
endfunction

Near the bottom there are three lines that remove two items and add one. In this case it removes items with the rawcode ciri and I01B and replaces them with I01M. Every system is a little different but you should be able to find what you're looking for like that.

The problem now is that you have three items but no idea which ones they are just by the rawcode. You can try looking in the rawcodes for the map, but for korean maps it doesn't help much unless you understand the language.
Spoiler:
Code:
[ciri\1667854953]|CFF87CEFA[Normal]10급 신성한 룬|R
[I01B\1227895106][Mix]9급 룬의 조각
[I01M\1227895117]|CFF87CEFA[Normal]9급 신성한 룬|R

Now if Warcraft displays the name of the item and you understand korean, you should be fine but that's probably not the case. Let's say you picked up an item in the game but have no idea what to combine it with. This is where JJCP comes in. JJCP has a very useful command to help in this situation called -itemid. It's just as it sounds, its able to give you a rawcode of the item in the top-left of your inventory. After getting the rawcode search the Jass again using it till you get to the trigger where its removed. Copy down the second item needed and go back to the game and this time use the -spawn code for the other item. You should have both items needed now and the -create command should work fine. I can't really give any tips how to find the second item in game though, so thats up to you to find out. I hope this answers everything.

_________________
Image


Top
 Profile  
 
PostPosted: August 17th, 2014, 1:23 am 
Offline
Member
User avatar

Joined: August 18th, 2013, 4:48 pm
Posts: 90
Location: Vampire Hunting
Title: The Day Walker
thank you very much,
one question though,
if in a game instead of a command you walk somewhere to create an item, what would it be near rather than the chatevent of "-create"??


Top
 Profile  
 
PostPosted: August 17th, 2014, 2:39 am 
Offline
Forum Staff
User avatar

Joined: November 17th, 2008, 3:49 pm
Posts: 610
Off the top of my head im not quite sure. EnterRect would work but that would take a very long time to search through everything. Point me in the direction of a map that has that kind of system and ill take a look.

_________________
Image


Top
 Profile  
 
PostPosted: August 17th, 2014, 3:39 pm 
Offline
Member
User avatar

Joined: August 18th, 2013, 4:48 pm
Posts: 90
Location: Vampire Hunting
Title: The Day Walker
this map here - http://www.makemehost.com/ShareMaps/new ... ..3.41.w3x
has a system like that and im kinda stuck on items myself
if you could take a look and find anything helpful it would be much appreciated.


Top
 Profile  
 
PostPosted: August 18th, 2014, 12:52 am 
Offline
Forum Staff
User avatar

Joined: November 17th, 2008, 3:49 pm
Posts: 610
Alright, well probably searching for RemoveItem and AddItem are your best bets to find em. I found a small number of recipes in the map but ive got no way to test them out, unless I get a hold of a cheated map. Apparently for this map the items use a different numbering than others like Greed for instance but the rawcodes still give the spawning code.

Spoiler:
Code:
function Gx takes nothing returns boolean
return(UnitHasItemOfTypeBJ(GetTriggerUnit(),1227894834))and(UnitHasItemOfTypeBJ(GetTriggerUnit(),1227894849))and(UnitHasItemOfTypeBJ(GetTriggerUnit(),1227894841))
endfunction
function Hx takes nothing returns nothing
if(Gx())then
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnteringUnit(),1227894834))
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnteringUnit(),1227894841))
call RemoveItem(GetItemOfTypeFromUnitBJ(GetEnteringUnit(),1227894849))
call UnitAddItemByIdSwapped(1227894836,GetTriggerUnit())
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,6.,("|c0000ffff"+(GetItemName(bj_lastCreatedItem)+"|c00ffff00을(를) 조합하였습니다.|r")))
endif
endfunction

Spoiler:
Code:
[I002\1227894834]소원의 돌 파편
[I009\1227894841]노말 왕초보 기사
[I00A\1227894849]울프의 어금니

[I004\1227894836]매직|r 나도 기사다

_________________
Image


Top
 Profile  
 
PostPosted: August 18th, 2014, 9:41 pm 
Offline
Member
User avatar

Joined: August 18th, 2013, 4:48 pm
Posts: 90
Location: Vampire Hunting
Title: The Day Walker
thanks, appreciated
but how did u compare the long codes to a raw code list to find what item it corresponded to?


Top
 Profile  
 
PostPosted: August 18th, 2014, 10:10 pm 
Offline
Forum Staff
User avatar

Joined: November 17th, 2008, 3:49 pm
Posts: 610
Im not exactly even sure what the long string of numbers for that map represent so maybe i got lucky in that regard, but basicly i ripped the rawcodes from the map using RMPQEx and then i used Haxorizer and cleaned them up. It ended up in that format. I looked over the uncleaned rawcode list but those numbers aren't shown, so im not really sure. Perhaps someone else can shed some light on that.

_________________
Image


Top
 Profile  
 
PostPosted: August 18th, 2014, 10:24 pm 
Offline
Member
User avatar

Joined: August 18th, 2013, 4:48 pm
Posts: 90
Location: Vampire Hunting
Title: The Day Walker
can u post that list of cleaned codes?


Top
 Profile  
 
PostPosted: August 18th, 2014, 10:37 pm 
Offline
Forum Staff
User avatar

Joined: November 17th, 2008, 3:49 pm
Posts: 610
Sure


You do not have the required permissions to view the files attached to this post.

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)