Hyoru Posted February 14, 2012 Group: Members Topic Count: 45 Topics Per Day: 0.01 Content Count: 122 Reputation: 11 Joined: 01/30/12 Last Seen: Sunday at 07:10 PM Share Posted February 14, 2012 (edited) 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 February 14, 2012 by Hyoru Quote Link to comment Share on other sites More sharing options...
llchrisll Posted February 14, 2012 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 626 Reputation: 189 Joined: 11/19/11 Last Seen: March 25 Share Posted February 14, 2012 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 . Regards, Chris 1 Quote Link to comment Share on other sites More sharing options...
Hyoru Posted February 14, 2012 Group: Members Topic Count: 45 Topics Per Day: 0.01 Content Count: 122 Reputation: 11 Joined: 01/30/12 Last Seen: Sunday at 07:10 PM Author Share Posted February 14, 2012 Thanks a lot Chris! Just one more thing, after the time out, how can I add @killmonster and @cleanmap in the map? Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 15, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted February 15, 2012 , 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. 1 Quote Link to comment Share on other sites More sharing options...
Hyoru Posted February 15, 2012 Group: Members Topic Count: 45 Topics Per Day: 0.01 Content Count: 122 Reputation: 11 Joined: 01/30/12 Last Seen: Sunday at 07:10 PM Author Share Posted February 15, 2012 Thanks, and cleanmap? Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 16, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted February 16, 2012 using too much atcommand script command might not as good as you think... Quote Link to comment Share on other sites More sharing options...
Hyoru Posted February 16, 2012 Group: Members Topic Count: 45 Topics Per Day: 0.01 Content Count: 122 Reputation: 11 Joined: 01/30/12 Last Seen: Sunday at 07:10 PM Author Share Posted February 16, 2012 o_o I didn't knew this :/ ok then thanks. Quote Link to comment Share on other sites More sharing options...
Question
Hyoru
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:
Edited by HyoruLink to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.