Noire Posted April 23, 2020 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 103 Reputation: 1 Joined: 06/26/13 Last Seen: April 14 Share 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 Link to comment Share on other sites More sharing options...
0 Tokei Posted April 23, 2020 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 696 Reputation: 722 Joined: 11/12/12 Last Seen: 6 hours ago Share 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 Link to comment Share on other sites More sharing options...
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
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.