Jump to content
  • 0

Script after the Close


Question

Posted

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)

5 answers to this question

Recommended Posts

Posted

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

Posted

try this

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

or you can try this

close2;
initnpctimer;
end;

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

Posted

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.

Posted (edited)

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...