Jump to content
  • 0

Player not attached, progressbar & sleep2


Kido

Question


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Hello, i'm trying to make this script work

map,183,66,5	script	NPC	111,{
mes "text";
sleep2 5000;
warp "map",38,108;
sleep 3000;
progressbar 0x000000,3;
dispbottom "Text";
message strcharinfo(0),"Text";
end;
}

It works until the warp part, after the sleep2 the progressbar doesn't appear, nor the bottom or the message, then i get these errors

 

3KE7OHW.png

'Tumba' is the name of the npc and the 'cave' it's the location of it

 

thank you so much in advance, i know i'm missing something after the progressbar but i'm not sure, because everyime the progressbar end i get those errors ):

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

I didn't try your script out, but try changing the format of your progress bar to something like this: progressbar "RRGGBB",3;

 

Peopleperson49

 

I believe yoru color format is wrong.

*progressbar "<color>",<seconds>;

This command works almost like sleep2, but displays a progress bar
above the head of the currently attached character (like cast bar).
Once the given amount of seconds passes, the script resumes. If the
character moves while the progress bar progresses, it is aborted and
the script ends. The color format is in RGB (0xRRGGBB). The color is
currently ignored by the client and appears always green.

Also message strcharinfo(0),"Text"; should be more like below. But it is also easier for me to just use mes "strcharinfo(0)+" TEXT."; command.

*message "<character name>","<message>";

That command will send a message to the chat window of the character specified
by name. The text will also appear above the head of that character. It will not
be seen by anyone else.
Edited by Peopleperson49
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  846
  • Reputation:   137
  • Joined:  02/26/14
  • Last Seen:  

progressbar "ffffff",3;

^That is the style for progressbar

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Yeap, you said that so much more simply than I did Pneuma, lol.

 

Peopleperson49

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

sleep 3000;   //  ---> change to sleep2

only sleep2 will save the RID of the players.

 

or else change to other timer like attachnpctimer + initnpctimer or addtimer

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

sleep 3000;   //  ---> change to sleep2

only sleep2 will save the RID of the players.

 

or else change to other timer like attachnpctimer + initnpctimer or addtimer

 

 

oh god that explains a lot, i forgot the 2 DD:

 

i use this line with another script and the progressbar shows good

progressbar 0x000000,3;

well gonna test it with 

ffffff

Edit:

tested and got this too D:

IGNUsiN.png

(it's another npc but it's the same as the one i posted)

 

Hmm i tried to add another progressbar after thr sleep 2 and now i got this error D:

map,183,66,5	script	NPC	111,{
mes "text";
sleep2 5000;
warp "map",38,108;
sleep2 3000;
progressbar 0x000000,3;
dispbottom "Text";
message strcharinfo(0),"Text";
end;
}

Yyddh1Z.png

 

and then my char can't move x_xalso the disbottom and the message doesn't appear D:

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

Pneuma already explained it.

 

progressbar "ffffff",3;

^That is the style for progressbar

 

 

it need a STRING parameter, not an INTEGER parameter

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

Pneuma already explained it.

 

progressbar "ffffff",3;

^That is the style for progressbar

 

 

it need a STRING parameter, not an INTEGER parameter

 

Thanks it solved it, the debugs didn't appear o:

 

i had it like this

progressbar ffffff,3;

it should be like this

progressbar "ffffff",3;

:DD

 

so it was as pplperon said so, thanks to all ;3

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

Glad we all could help. I completely missed the sleep2, lol.

 

Peopleperson49

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

yeah i wish i could give more than 1 best answer, because thanks to you 3 now it works without any error :DD

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...