Noire Posted April 23, 2020 Posted April 23, 2020 (edited) Help, my npc dont do ./dice emoticon having a problem on my script T_T close2; mapannounce "guild_room","[ Dice Machine ] : Let's start, click the switch below for your answer..",0,0xFFFF00; enablenpc "Odd#550"; enablenpc "Even#551"; sleep2 3000; mapannounce "guild_room","[ Dice Machine ] : I will roll the dice in..",0,0xFFFF00; sleep2 1500; mapannounce "guild_room","[ Dice Machine ] : 5",0,0xFFFF00; sleep2 1500; mapannounce "guild_room","[ Dice Machine ] : 4",0,0xFFFF00; sleep2 1500; mapannounce "guild_room","[ Dice Machine ] : 3",0,0xFFFF00; sleep2 1500; mapannounce "guild_room","[ Dice Machine ] : 2",0,0xFFFF00; sleep2 1500; mapannounce "guild_room","[ Dice Machine ] : 1",0,0xFFFF00; sleep2 2000; disablenpc "Odd#550"; disablenpc "Even#551"; areawarp "guild_room",228,370,232,366,"prontera",150,150; mapannounce "guild_room","[ Dice Machine ] : Watch guys.",0,0xFFFF00; sleep2 1500; set @rdice, rand(1,6); setarray .@dicemots[1],58,59,60,61,62,63; emotion .@dicemots[@rdice]; end; } Edited April 23, 2020 by Haruka Mayumi Code Box Quote
0 Tokei Posted April 23, 2020 Posted April 23, 2020 Heya, Your main issue is that you're using "@rdice" instead of ".@rdice". The dot in front of the variable is for npc variables, while no dot is for a player variable. As a... recommendation, you should be using a donpcevent "NPCName::OnStart" after the close2 and move all your code there instead. You're trying to run the rest of the script on the player and that's not necessary here. Since the player was no longer attached to the script or was offline, the script failed to get the variable from the player. Quote
Question
Noire
Help, my npc dont do ./dice emoticon having a problem on my script T_T
close2; mapannounce "guild_room","[ Dice Machine ] : Let's start, click the switch below for your answer..",0,0xFFFF00; enablenpc "Odd#550"; enablenpc "Even#551"; sleep2 3000; mapannounce "guild_room","[ Dice Machine ] : I will roll the dice in..",0,0xFFFF00; sleep2 1500; mapannounce "guild_room","[ Dice Machine ] : 5",0,0xFFFF00; sleep2 1500; mapannounce "guild_room","[ Dice Machine ] : 4",0,0xFFFF00; sleep2 1500; mapannounce "guild_room","[ Dice Machine ] : 3",0,0xFFFF00; sleep2 1500; mapannounce "guild_room","[ Dice Machine ] : 2",0,0xFFFF00; sleep2 1500; mapannounce "guild_room","[ Dice Machine ] : 1",0,0xFFFF00; sleep2 2000; disablenpc "Odd#550"; disablenpc "Even#551"; areawarp "guild_room",228,370,232,366,"prontera",150,150; mapannounce "guild_room","[ Dice Machine ] : Watch guys.",0,0xFFFF00; sleep2 1500; set @rdice, rand(1,6); setarray .@dicemots[1],58,59,60,61,62,63; emotion .@dicemots[@rdice]; end; }
Code Box
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.