deniswalle96 Posted April 14, 2024 Group: Members Topic Count: 13 Topics Per Day: 0.01 Content Count: 33 Reputation: 3 Joined: 03/15/20 Last Seen: July 24, 2024 Share 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 Link to comment Share on other sites More sharing options...
0 Rynbef Posted April 15, 2024 Group: Forum Moderator Topic Count: 48 Topics Per Day: 0.01 Content Count: 944 Reputation: 125 Joined: 05/23/12 Last Seen: Friday at 06:23 PM Share Posted April 15, 2024 U can use OnNPCKillEvent and do some checks Rynbef~ Quote Link to comment Share on other sites More sharing options...
0 deniswalle96 Posted April 17, 2024 Group: Members Topic Count: 13 Topics Per Day: 0.01 Content Count: 33 Reputation: 3 Joined: 03/15/20 Last Seen: July 24, 2024 Author Share 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 Link to comment Share on other sites More sharing options...
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?
Link to comment
Share on other sites
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.