domez86 Posted October 12, 2019 Group: Members Topic Count: 85 Topics Per Day: 0.02 Content Count: 207 Reputation: 0 Joined: 06/11/13 Last Seen: July 11, 2020 Share Posted October 12, 2019 hi! i would need a npc that evokes a random mob from a predefined list. I tried many scripts like: atcommand "@monster rand (1001,1002,1003)"; npc does not give errors but I always get "@monster failed" when I click... help me pls? txn! Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted October 12, 2019 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted October 12, 2019 - script Sample FAKE_NPC,{ OnInit: bindatcmd("monster", strnpcinfo(3)+"::OnAtcommand"); end; OnAtcommand: .@mob_id = F_Rand(1001, 1002, 1003); // mob id. .@amount = atoi(.@atcmd_parameters$[0]); if (.@amount <= 0) .@amount = 1; getmapxy(.@map$, .@x, .@y, BL_PC); monster(.@map$, .@x + rand(-2,2), .@y + rand(-2,2), "--ja--", .@mob_id, .@amount); end; } Quote Link to comment Share on other sites More sharing options...
0 domez86 Posted October 12, 2019 Group: Members Topic Count: 85 Topics Per Day: 0.02 Content Count: 207 Reputation: 0 Joined: 06/11/13 Last Seen: July 11, 2020 Author Share Posted October 12, 2019 35 minutes ago, Emistry said: - script Sample FAKE_NPC,{ OnInit: bindatcmd("monster", strnpcinfo(3)+"::OnAtcommand"); end; OnAtcommand: .@mob_id = F_Rand(1001, 1002, 1003); // mob id. .@amount = atoi(.@atcmd_parameters$[0]); if (.@amount <= 0) .@amount = 1; getmapxy(.@map$, .@x, .@y, BL_PC); monster(.@map$, .@x + rand(-2,2), .@y + rand(-2,2), "--ja--", .@mob_id, .@amount); end; } not work, when click, not error script but not work... Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted October 20, 2019 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted October 20, 2019 On 10/12/2019 at 7:01 AM, domez86 said: not work, when click, not error script but not work... It's bound to @monster command... Just do @monster 3 will summon 3 of a random mob id from that list. Quote Link to comment Share on other sites More sharing options...
Question
domez86
hi!
i would need a npc that evokes a random mob from a predefined list.
I tried many scripts like:
atcommand "@monster rand (1001,1002,1003)";
npc does not give errors but I always get "@monster failed" when I click...
help me pls? txn!
Link to comment
Share on other sites
3 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.