Jump to content
  • 0

Script after the Close


Sparrow

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   0
  • Joined:  05/19/12
  • Last Seen:  

Good time, distinguished members of this forum.

I've got a question arose.

How to make after talking to the NPC, he disappeared through, say, a minute?

prt_fild08,54,59,4 script Mage::norm_mage 937,{
mes "^00aa00[Mage]^000000";
mes "I am free!";
close2;
//help to make the timer correctly
}

An illustrative example. You come to the NPC. Speak with him. Then you press close, and then a minute later, he

hideonnpc "norm_mage";

How to implement it?)

P.S. Sorry for my english)

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  183
  • Reputation:   15
  • Joined:  06/10/12
  • Last Seen:  

prt_fild08,54,59,4 <tab> script <tab> Mage <tab> 937,{
mes "^00aa00[Mage]^000000";
mes "I am free!";
initnpctimer;
close2;
OnTimer60000:
hideonnpc "Mage";
stopnpctimer;
end;
}

Maybe not works, but try ;)

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:  

try this

close2;
sleep2 60000;
hideonnpc strnpcinfo(0);
end;

or you can try this

close2;
initnpctimer;
end;

OnTimer60000:
hideonnpc strnpcinfo(0);
stopnpctimer;
end;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  137
  • Reputation:   23
  • Joined:  06/08/12
  • Last Seen:  

what about enablenpc/ disablenpc o_O?

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:  

same way i post above

but sometime using different NPC to disable / enable another NPC would be safer.

let say you have NPC A and NPC B

if you use NPC B to enable / disable NPC A..it work for all the time.

same if use NPC A to enable / disable NPC B..it work for all the time.

but...

if you use NPC B to disable NPC, then try to Enable or Disable NPC B or NPC A using NPC B...i think wont work

same goes to NPC A if did the same things.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   0
  • Joined:  05/19/12
  • Last Seen:  

Thank you all!

He came up option:

close2;
sleep2 60000;
hideonnpc "ice_mage3";
end;

Still, I do not know how to explain more clearly.

Can I do that when the first person fits and starts sleep2, when other players would approach the NPC until he disappeared, did not run again sleep2, and worked for them a different scenario.

I imagine it as:

prt_fild08,54,59,4 script Mage::mage2 937,{
if (bubabuba == 1) goto label;
mes "^00aa00[Mage]^000000";
mes "I am a free!";
set bubabuba,1;
close2;
sleep2 60000;
hideonnpc "ice_mage3";
end;
label:
mes "I will soon disappear, bro.";
close;
}

But I do not know how to do so a global variable to be assigned a status variable is influenced by the first player and all the other players and NPCs only when sobnulyalas disappears.

It is impossible to do, right?

  • Figured out. Thank you all, you can close the topic =)

Edited by Sparrow
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...