Jump to content
  • 0

@rdice emoticon problem on npc


Noire

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  103
  • Reputation:   1
  • Joined:  06/26/13
  • Last Seen:  

    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;
    }



 

1212212122121212.png

Edited by Haruka Mayumi
Code Box
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  666
  • Reputation:   674
  • Joined:  11/12/12
  • Last Seen:  

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...