need help with JASS on ITEM DROP RATE

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

tlsdbcjf
Newcomer
Posts: 23
Joined: November 1st, 2008, 10:17 am

need help with JASS on ITEM DROP RATE

Post by tlsdbcjf »

Hi folks, this is tls,

and I'm here again today, asking for more help with professionals :D

Yes I'm currently practicing my Jass skills with going into jass file of many rpg maps,

and often trying this and that.

and recently, I tried to change the drop rate of items of a certain map.

It's an rpg map, with boss items. There are 3 classification for boss items.

Legendary (very drop rate), Rare (low drop rate), and normal (high drop rate).

I was wondering how to change the drop rate of items, so that when I kill a boss of my choice,

He would drop the item of my desire on spot. I tried it with my best shot, but actually couldn't find

anything on item drop rate.

OR

Could I get some help with enabling bosses to be manipulated, and those manipulated bosses dropping item with

same drop rate? So that I can just mass copy a boss, and just kill them all with -kill command on JJ's CP and look for

the item of my choice, out of items dropped by all bosses.

Thanx alot.

Link -> http://epicwar.com/maps/113213/


P.S. Mass copying a boss and killing him wont work, as no matter how many bosses there are, only one will drop an item.
User avatar
Syre
Forum Staff
Posts: 506
Joined: November 17th, 2008, 3:49 pm

Re: need help with JASS on ITEM DROP RATE

Post by Syre »

Why try to mess with the drop rate, when you can just use JJ's CP and use the spawn command to get whatever item you want?

Anyways..besides that..all you gotta do with the drop rate is find the unit id in the jass file and search for the items when killed. For example..legion has an item id of H04R. Then, after searching through the jass file you come up with this.

Code: Select all

function Trig_Legion_Actions takes nothing returns nothing
    set udg_TempDropInt = GetRandomInt(1, 200)
    if ( Trig_Legion_Func002C() ) then
        set udg_TempDropInt = GetRandomInt(1, 1000)
        if ( Trig_Legion_Func002Func002C() ) then
            call CreateItemLoc( 'I04L', GetUnitLoc(GetTriggerUnit()) )
        else
            if ( Trig_Legion_Func002Func002Func001C() ) then
                call CreateItemLoc( 'I00T', GetUnitLoc(GetTriggerUnit()) )
            else
                if ( Trig_Legion_Func002Func002Func001Func001C() ) then
                    call CreateItemLoc( 'I00U', GetUnitLoc(GetTriggerUnit()) )
                else
                endif
            endif
        endif
    else
        if ( Trig_Legion_Func002Func003C() ) then
            call CreateItemLoc( 'I04M', GetUnitLoc(GetTriggerUnit()) )
        else
        endif
    endif
endfunction
This is the trigger that determines which item is dropped when legion dies..now looking at this is pretty clear, that when he dies, theres a chance that he will drop either one version of three swords (I04L, I00T, and I00U), or Legions Armor (I04M). Now, if you wanted him to just drop legions armor, just rearrange the code a bit to

Code: Select all

function Trig_Legion_Actions takes nothing returns nothing
    set udg_TempDropInt = GetRandomInt(1, 200)
    if ( Trig_Legion_Func002C() ) then
        set udg_TempDropInt = GetRandomInt(1, 1000)
        if ( Trig_Legion_Func002Func003C() ) then
            call CreateItemLoc( 'I04M', GetUnitLoc(GetTriggerUnit()) )
        else
        endif
    endif
endfunction
(Please do note that I dont study jass..so i know this trigger can be compacted and may not even work, but im just trying to give ya the general idea of what needs to be done.) Anyways, when ya get that done, just reimport back into the map..and now when legion dies, he will only drop the armor. You just have to do that for whatever boss you want to drop what item..or you could just find a weak but numerous enemy, such as faceless ones, and change their item drop to drop boss items instead.

Anyways, to get the unit id just extract the unit file (war3map.w3u), go into world editor, open the object editor, get onto the unit tab, click file, then import unit settings. (And the same for items, except its war3map.w3t.)
Image
User avatar
haxorico
Super Moderator
Posts: 3197
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: need help with JASS on ITEM DROP RATE

Post by haxorico »

U can just use RMPQEx
dump object data file
mark the files u want.
extract
win
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac: 

Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).

Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?