UnknownUser0317 Posted December 10, 2016 Group: Members Topic Count: 5 Topics Per Day: 0.00 Content Count: 27 Reputation: 1 Joined: 11/19/16 Last Seen: January 6, 2017 Share Posted December 10, 2016 Requesting a script that uses warp portal sprite, if all of the members of the party is not standing above the warp npc, it will not warp the party, unless all of the members are already above the warp npc. thanks! Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted December 11, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 4 hours ago Share Posted December 11, 2016 you can try something like this. https://pastebin.com/jJsAAmq2 @Skorm your approach doesn't always work. There are few parts you can fix the issue. Change from using OnTouch to OnTouch_ or... Only triggered by Party Leader to avoid calling the npc checking whenever a party member reach the portal. .pre_cnt and .party_id potentially always get override by other member who entered the area, caused the value might get reset halfway during the checking. addrid caused the script run extra instances depend on all member in that area. Quote Link to comment Share on other sites More sharing options...
1 Skorm Posted December 10, 2016 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted December 10, 2016 (edited) Requesting a script that uses warp portal sprite, if all of the members of the party is not standing above the warp npc, it will not warp the party, unless all of the members are already above the warp npc. thanks! That are a bunch of ways to do this but here's one. prontera,190,181,5 script Online Guild 45,2,2,{ end; OnTouch: .pre_cnt = 0; .party = getcharid(1); if( !.party ) end; getpartymember .party; .party_cnt = $@partymembercount; addrid( 4, 0, 190-2, 181+2, 190+2, 181-2 ); if( .party == getcharid(1) ) { .pre_cnt++; if( .pre_cnt == .party_cnt ) warpparty "geffen",192,178,.party; } end; } Edited December 10, 2016 by Skorm Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted December 11, 2016 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: April 11 Share Posted December 11, 2016 (edited) 5 hours ago, Emistry said: your approach doesn't always work. There are few parts you can fix the issue. Change from using OnTouch to OnTouch_ or... Only triggered by Party Leader to avoid calling the npc checking whenever a party member reach the portal. .pre_cnt and .party_id potentially always get override by other member who entered the area, caused the value might get reset halfway during the checking. addrid caused the script run extra instances depend on all member in that area. Already completely aware of this. The chance of the script failing is extremely small so I thought whatever. Edited December 11, 2016 by Skorm Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted December 11, 2016 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 4 hours ago Share Posted December 11, 2016 actually the chance of script failing is low because you test with less player. If there are high amount of player, the chance would be increased. All you need is just one or few more char without party keep walking around to reset the variables to fail the warp for other party. it's actually from 10 lines to around 15 lines of changes if you ignore those unnecessary lines. Quote Link to comment Share on other sites More sharing options...
Question
UnknownUser0317
Requesting a script that uses warp portal sprite, if all of the members of the party is not standing above the warp npc, it will not warp the party, unless all of the members are already above the warp npc. thanks!
Link to comment
Share on other sites
4 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.