Jump to content
  • 0

Teleport NPC


Hyoru

Question


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

Hi,

i need a npc like this:

Teleport NPC.

you need the item 7720 to teleport, you can stay only 5 minutes inside the room and when one person is inside the room, another person cant enter.

the map: turbo_room

someone can help me?

Thanks in advanced.

Edit:

Hi again, i tried by myself and i made a piece...i dont know how to put the price but if helps is there:

prontera,153,150,5 script Teleport 61,{
set .@map$,"turbo_room";
addtimer 300000, strnpcinfo(3)+"::On5Minutes";
if (getmapusers(.@map$) >= 1 ){
mes "Room is full.";
close;}
warp .@map$,100,100;
dispbottom "You have 5 Minutes to stay here.";
initnpctimer;
end;
On5Minutes:
dispbottom "Time out.";
mapwarp "turbo_room","prontera",150,150;
end;
}

Edited by Hyoru
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  626
  • Reputation:   188
  • Joined:  11/19/11
  • Last Seen:  

First:

I would move the

addtimer 300000, strnpcinfo(3)+"::On5Minutes";

before the warp not before you check if users are already on that map.

Second:

To add the price add this

set .@id,7720;
if(countitem(.@id) < 1) {
mes "You need at least 1x "+getitemname(.@id)+" to teleport.";
close;
}

after

set .@map$,"turbo_room";

and this

delitem .@id,1;

after

warp .@map$,100,100;

I hope was able to help /hmm.

Regards,

Chris

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

Thanks a lot Chris! Just one more thing, after the time out, how can I add @killmonster and @cleanmap in the map?

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:  

, how can I add @killmonster and @cleanmap in the map?

*killmonster "<map name>","<event label>"{,<type>};
This command will kill all monsters that were spawned with 'monster' or
'addmonster' and have a specified event label attached to them. Commonly used to
get rid of remaining quest monsters once the quest is complete.
If the label is given as "All", all monsters which have their respawn times set
to -1 (like all the monsters summoned with 'monster' or 'areamonster' script
command, and all monsters summoned with GM commands, but no other ones - that
is, all non-permanent monsters) on the specified map will be killed regardless
of the event label value.
As of r12876 killmonster now supports an optional argument type. Using 1 for type
will make the command fire "OnMyMobDead" events from any monsters that do die
as a result of this command.

---------------------------------------

*killmonsterall "<map name>"{,<type>};
This command will kill all monsters on a specified map name, regardless of how
they were spawned or what they are. As of r12873, The behavior has changed slightly.
In light of a label behavior fix for mob spawning commands that will now allow the label to
trigger when there is no player, killmonsterall has also been modified to support this.
Using this the normal/old way means labels don't trigger when a player didn't
attack/kill a monster. This is because it breaks compatibility with older scripts if
forced to use the new method. However, if you wish to use the new label type with this
command, simply use 1 for type. Any other number won't be recognized.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

Thanks, and cleanmap?

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:  

using too much atcommand script command might not as good as you think...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  122
  • Reputation:   11
  • Joined:  01/30/12
  • Last Seen:  

o_o I didn't knew this :/ ok then thanks.

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