deniswalle96 Posted April 14, 2024 Posted April 14, 2024 Given a list of for example, 5 items, is it possible to add them to the drop list of a mob, but in a way that only one of them has a chance to drop when the mob is killed? Quote
0 Rynbef Posted April 15, 2024 Posted April 15, 2024 U can use OnNPCKillEvent and do some checks Rynbef~ Quote
0 deniswalle96 Posted April 17, 2024 Author Posted April 17, 2024 On 4/15/2024 at 2:38 AM, Rynbef said: U can use OnNPCKillEvent and do some checks Rynbef~ I kinda figured it out, but I still can't make the item drop on the coordinates where the monster died. Tried getunitdata, but no success. OnMonsterKilled: .@dropchance = rand(1,100); if(.@dropchance <= 5){ getmapxy(.@map$,.@x,.@y,BL_PC); setarray .@fateshard[0],1000258,1000259,1000260,1000261,1000262; .@randomshard = rand(getarraysize(.@fateshard)); makeitem (.@fateshard[.@randomshard]),1,.@map$,.@x,.@y; } dispbottom "Rand: "+.@dropchance; } Also, since i'm a complete newbie at scripting, I still don't understand the different scopes of variables, can you enlight me on this one?I've read the doc/script_commands.txt file, but it's not clear to me. Like, when should I use ".@" vs "." var? Quote
Question
deniswalle96
Given a list of for example, 5 items, is it possible to add them to the drop list of a mob, but in a way that only one of them has a chance to drop when the mob is killed?
2 answers 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.