lamnor Posted July 31, 2020 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 26 Reputation: 0 Joined: 03/08/16 Last Seen: 2 hours ago Share Posted July 31, 2020 Hello, I have a direct item drop script and I would like to know how to make the % of the bubble gum bonus influence this drop. Ow if there is any other way to make the gum influence the drop with this type of script. Here is the script: function script sLuckDrop { for(set @i,0;@i < getargcount();set @i,@i+3){ set @rd, rand(1000); if(getarg(@i+2) >= @rd){ getitem getarg(@i),getarg(@i+1); return; } } return; } - script MonstroDrop -1,{ OnNPCKillEvent: switch(killedrid){ case 1002: sLuckDrop(504,1,500); end; } end; } Quote Link to comment Share on other sites More sharing options...
0 Kreustoo Posted July 31, 2020 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 216 Reputation: 45 Joined: 05/03/13 Last Seen: March 9 Share Posted July 31, 2020 Hello, Just use getstatus on the SC of bubble gum (which is SC_ITEMBOOST) *getstatus(<effect type>{,<type>{,<char_id>}}) Retrieve information about a specific status effect when called. Depending on <type> specified the function will return different information. Possible <type> values: - 0 or undefined: whether the status is active - 1: the val1 of the status - 2: the val2 of the status - 3: the val3 of the status - 4: the val4 of the status - 5: the amount of time in milliseconds that the status has remaining If <type> is not defined or is set to 0, then the script function will either return 1 if the status is active, or 0 if the status is not active. If the status is not active when any of the <type> fields are provided, this script function will always return 0. Quote Link to comment Share on other sites More sharing options...
Question
lamnor
Hello, I have a direct item drop script and I would like to know how to make the % of the bubble gum bonus influence this drop.
Ow if there is any other way to make the gum influence the drop with this type of script.
Here is the script:
function script sLuckDrop {
for(set @i,0;@i < getargcount();set @i,@i+3){
set @rd, rand(1000);
if(getarg(@i+2) >= @rd){
getitem getarg(@i),getarg(@i+1);
return;
}
}
return;
}
- script MonstroDrop -1,{
OnNPCKillEvent:
switch(killedrid){
case 1002: sLuckDrop(504,1,500); end;
}
end;
}
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.