jehadmalek Posted July 14, 2016 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 27 Reputation: 0 Joined: 07/28/13 Last Seen: July 22, 2016 Share Posted July 14, 2016 Hi , what i want to do is when player clicks the NPC it goes to player_here & when GM Does it goes to gm_only prontera,152,260,5 script Starter 733,{ if( getgmlevel() >= 99){ player_here: mes "^FF0000[Starter]^000000"; mes "^0000FF[Get Ready The Event Will Start Soon .]^000000"; close; } gm_only: if (getgmlevel() < 80) goto player_here; if ($@race != 0) goto L_Started; if ($@counting != 0) goto L_Started; if ($@racecount == 1) goto L_Started; } else { end; } L_Menu: mes "[Race Starter]"; mes "Please stay on the Eastern side of me."; menu "Start Race",L_Count,"Cancel",-; close; L_Count: set $@counting,1; mes "Counting down..."; addtimer 1000, "Starter::OnCount1000"; addtimer 2000, "Starter::OnCount2000"; addtimer 3000, "Starter::OnCount3000"; addtimer 4000, "Starter::OnCount4000"; announce strcharinfo(0) + "Started a countdown",1; announce "Get ready to race!",1; close; OnCount1000: announce "[3]",1; end; OnCount2000: announce "[2]",1; end; OnCount3000: announce "[1]",1; end; OnCount4000: emotion e_go; specialeffect EF_CHIMTO; announce "[GO!]",1; set $@race,1; set $@position,0; set $@counting,0; set $@raceid,rand(100000,999999); end; L_Started: if ((getmapusers("pvp_y_1-5") < 3) && ($@position > 0)) goto L_Menu; if ($@position > 2) goto L_Menu; mes "[Starter]"; mes "Race in progress"; close; OnInit: set $@race,0; set $@position,0; set $@racecount,0; end; } & Thx Quote Link to comment Share on other sites More sharing options...
0 Kurofly Posted July 16, 2016 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 283 Reputation: 31 Joined: 07/08/14 Last Seen: January 15, 2022 Share Posted July 16, 2016 I don't have the pvp_y_<x>-5 maps, I can't test it. What's the error? If there's no error what doesn't work? Full starter: //Counts down and starts race pvp_y_1-5,145,269,5 script Starter 733,{ if ($@race != 0) goto L_Started; if ($@counting != 0) goto L_Started; if ($@racecount == 1) goto L_Started; L_Menu: mes "[Race Starter]"; mes "Please stay on the Eastern side of me."; // menu "Start Race",L_Count,"Cancel",-; if (getgmlevel() >= 80) menu "Start Race",L_Count,"Cancel",-; close; L_Count: set $@counting,1; mes "Counting down..."; addtimer 1000, "Starter::OnCount1000"; addtimer 2000, "Starter::OnCount2000"; addtimer 3000, "Starter::OnCount3000"; addtimer 4000, "Starter::OnCount4000"; announce strcharinfo(0) + "Started a countdown",1; announce "Get ready to race!",1; close; OnCount1000: announce "[3]",1; end; OnCount2000: announce "[2]",1; end; OnCount3000: announce "[1]",1; end; OnCount4000: emotion e_go; specialeffect EF_CHIMTO; announce "[GO!]",1; set $@race,1; set $@position,0; set $@counting,0; set $@raceid,rand(100000,999999); end; L_Started: if ((getmapusers("pvp_y_1-5") < 3) && ($@position > 0)) goto L_Menu; if ($@position > 2) goto L_Menu; mes "[Starter]"; mes "Race in progress"; close; OnInit: set $@race,0; set $@position,0; set $@racecount,0; end; } Quote Link to comment Share on other sites More sharing options...
0 Helly Posted July 14, 2016 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 258 Reputation: 53 Joined: 01/09/12 Last Seen: December 26, 2020 Share Posted July 14, 2016 (edited) Hi there, well my knowledge in script is very basic jajaj but i found this in the wiki:Menus set .@menu$, "Player Option 1:Player Option 2"; if (getgmlevel() >= 99) { set .@menu$, .@menu$ + ":GM Menu"; } switch(select(.@menu$)) { case 1: mes "Player Option 1"; close; case 2: mes "Player Option 2"; close; case 3: mes "GM Menu"; cl hope found it useful. Good luck. Edited July 14, 2016 by Helly Quote Link to comment Share on other sites More sharing options...
0 Kurofly Posted July 14, 2016 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 283 Reputation: 31 Joined: 07/08/14 Last Seen: January 15, 2022 Share Posted July 14, 2016 Hi there I have no idea what your script is supposed to do xD Maybe like this? prontera,152,260,5 script Starter 733,{ if( getgmlevel() < 80){ player_here: mes "^FF0000[Starter]^000000"; mes "^0000FF[Get Ready The Event Will Start Soon .]^000000"; close; } gm_only: if ($@race != 0) goto L_Started; if ($@counting != 0) goto L_Started; if ($@racecount == 1) goto L_Started; end; L_Menu: mes "[Race Starter]"; mes "Please stay on the Eastern side of me."; menu "Start Race",L_Count,"Cancel",-; close; L_Count: set $@counting,1; mes "Counting down..."; addtimer 1000, "Starter::OnCount1000"; addtimer 2000, "Starter::OnCount2000"; addtimer 3000, "Starter::OnCount3000"; addtimer 4000, "Starter::OnCount4000"; announce strcharinfo(0) + "Started a countdown",1; announce "Get ready to race!",1; close; OnCount1000: announce "[3]",1; end; OnCount2000: announce "[2]",1; end; OnCount3000: announce "[1]",1; end; OnCount4000: emotion e_go; specialeffect EF_CHIMTO; announce "[GO!]",1; set $@race,1; set $@position,0; set $@counting,0; set $@raceid,rand(100000,999999); end; L_Started: if ((getmapusers("pvp_y_1-5") < 3) && ($@position > 0)) goto L_Menu; if ($@position > 2) goto L_Menu; mes "[Starter]"; mes "Race in progress"; close; OnInit: set $@race,0; set $@position,0; set $@racecount,0; end; } Quote Link to comment Share on other sites More sharing options...
0 jehadmalek Posted July 14, 2016 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 27 Reputation: 0 Joined: 07/28/13 Last Seen: July 22, 2016 Author Share Posted July 14, 2016 Hi there, well my knowledge in script is very basic jajaj but i found this in the wiki: Menus set .@menu$, "Player Option 1:Player Option 2"; if (getgmlevel() >= 99) { set .@menu$, .@menu$ + ":GM Menu"; } switch(select(.@menu$)) { case 1: mes "Player Option 1"; close; case 2: mes "Player Option 2"; close; case 3: mes "GM Menu"; cl hope found it useful. Good luck. Thank u but that wasn't what i was looking for Hi there I have no idea what your script is supposed to do xD Maybe like this? prontera,152,260,5 script Starter 733,{ if( getgmlevel() < 80){ player_here: mes "^FF0000[Starter]^000000"; mes "^0000FF[Get Ready The Event Will Start Soon .]^000000"; close; } gm_only: if ($@race != 0) goto L_Started; if ($@counting != 0) goto L_Started; if ($@racecount == 1) goto L_Started; end; L_Menu: mes "[Race Starter]"; mes "Please stay on the Eastern side of me."; menu "Start Race",L_Count,"Cancel",-; close; L_Count: set $@counting,1; mes "Counting down..."; addtimer 1000, "Starter::OnCount1000"; addtimer 2000, "Starter::OnCount2000"; addtimer 3000, "Starter::OnCount3000"; addtimer 4000, "Starter::OnCount4000"; announce strcharinfo(0) + "Started a countdown",1; announce "Get ready to race!",1; close; OnCount1000: announce "[3]",1; end; OnCount2000: announce "[2]",1; end; OnCount3000: announce "[1]",1; end; OnCount4000: emotion e_go; specialeffect EF_CHIMTO; announce "[GO!]",1; set $@race,1; set $@position,0; set $@counting,0; set $@raceid,rand(100000,999999); end; L_Started: if ((getmapusers("pvp_y_1-5") < 3) && ($@position > 0)) goto L_Menu; if ($@position > 2) goto L_Menu; mes "[Starter]"; mes "Race in progress"; close; OnInit: set $@race,0; set $@position,0; set $@racecount,0; end; } Thx , im turning Morocc Race into an offical event by Gm's & it has done Hi there I have no idea what your script is supposed to do xD Maybe like this? prontera,152,260,5 script Starter 733,{ if( getgmlevel() < 80){ player_here: mes "^FF0000[Starter]^000000"; mes "^0000FF[Get Ready The Event Will Start Soon .]^000000"; close; } gm_only: if ($@race != 0) goto L_Started; if ($@counting != 0) goto L_Started; if ($@racecount == 1) goto L_Started; end; L_Menu: mes "[Race Starter]"; mes "Please stay on the Eastern side of me."; menu "Start Race",L_Count,"Cancel",-; close; L_Count: set $@counting,1; mes "Counting down..."; addtimer 1000, "Starter::OnCount1000"; addtimer 2000, "Starter::OnCount2000"; addtimer 3000, "Starter::OnCount3000"; addtimer 4000, "Starter::OnCount4000"; announce strcharinfo(0) + "Started a countdown",1; announce "Get ready to race!",1; close; OnCount1000: announce "[3]",1; end; OnCount2000: announce "[2]",1; end; OnCount3000: announce "[1]",1; end; OnCount4000: emotion e_go; specialeffect EF_CHIMTO; announce "[GO!]",1; set $@race,1; set $@position,0; set $@counting,0; set $@raceid,rand(100000,999999); end; L_Started: if ((getmapusers("pvp_y_1-5") < 3) && ($@position > 0)) goto L_Menu; if ($@position > 2) goto L_Menu; mes "[Starter]"; mes "Race in progress"; close; OnInit: set $@race,0; set $@position,0; set $@racecount,0; end; } Thx , After trying , Player_here is working fine (in game) but when GM clicks it nothing is happening ... Quote Link to comment Share on other sites More sharing options...
0 Kurofly Posted July 14, 2016 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 283 Reputation: 31 Joined: 07/08/14 Last Seen: January 15, 2022 Share Posted July 14, 2016 That's normal, the '$@position' is never set to anything apart from 0, the L_Start menu will do nothing apart from calling the OnInit label ^^ I orginally though you had another script setting this variable but I'm starting to wonder. If you do have one please share it. If you don't, it looks like you're seriously struggling In that case just ask for us to do it, that'll be way quicker ^^ (describe what you want to do as much as possible if you want us to make it) Quote Link to comment Share on other sites More sharing options...
0 jehadmalek Posted July 15, 2016 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 27 Reputation: 0 Joined: 07/28/13 Last Seen: July 22, 2016 Author Share Posted July 15, 2016 That's normal, the '$@position' is never set to anything apart from 0, the L_Start menu will do nothing apart from calling the OnInit label ^^ I orginally though you had another script setting this variable but I'm starting to wonder. If you do have one please share it. If you don't, it looks like you're seriously struggling In that case just ask for us to do it, that'll be way quicker ^^ (describe what you want to do as much as possible if you want us to make it) What i want is just making this NPC Respond to GM_only , by this it will be 100% completed Quote Link to comment Share on other sites More sharing options...
0 Kurofly Posted July 15, 2016 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 283 Reputation: 31 Joined: 07/08/14 Last Seen: January 15, 2022 Share Posted July 15, 2016 (edited) It does go to the gm_only label on gm click, trust me. it then goes to the L_Started label but since the variable $@position has a value of 0,it does nothing apart from triggering the OnInit label. Add debug messages if you want to make sure: prontera,152,260,5 script Starter 733,{ if( getgmlevel() < 80){ player_here: mes "^FF0000[Starter]^000000"; mes "^0000FF[Get Ready The Event Will Start Soon .]^000000"; close; } gm_only: debugmes "triggering gm_only label"; if ($@race != 0) goto L_Started; if ($@counting != 0) goto L_Started; if ($@racecount == 1) goto L_Started; end; L_Menu: mes "[Race Starter]"; mes "Please stay on the Eastern side of me."; menu "Start Race",L_Count,"Cancel",-; close; L_Count: set $@counting,1; mes "Counting down..."; addtimer 1000, "Starter::OnCount1000"; addtimer 2000, "Starter::OnCount2000"; addtimer 3000, "Starter::OnCount3000"; addtimer 4000, "Starter::OnCount4000"; announce strcharinfo(0) + "Started a countdown",1; announce "Get ready to race!",1; close; OnCount1000: announce "[3]",1; end; OnCount2000: announce "[2]",1; end; OnCount3000: announce "[1]",1; end; OnCount4000: emotion e_go; specialeffect EF_CHIMTO; announce "[GO!]",1; set $@race,1; set $@position,0; set $@counting,0; set $@raceid,rand(100000,999999); end; L_Started: debugmes "triggering L_Started label"; debugmes "$@position value : "+$@position; if ((getmapusers("pvp_y_1-5") < 3) && ($@position > 0)) goto L_Menu; if ($@position > 2) goto L_Menu; mes "[Starter]"; mes "Race in progress"; close; OnInit: debugmes "triggering OnInit label"; set $@race,0; set $@position,0; set $@racecount,0; end; } Edited July 15, 2016 by Kurofly Quote Link to comment Share on other sites More sharing options...
0 jehadmalek Posted July 15, 2016 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 27 Reputation: 0 Joined: 07/28/13 Last Seen: July 22, 2016 Author Share Posted July 15, 2016 It does go to the gm_only label on gm click, trust me. it then goes to the L_Started label but since the variable $@position has a value of 0,it does nothing apart from triggering the OnInit label. Add debug messages if you want to make sure: prontera,152,260,5 script Starter 733,{ if( getgmlevel() < 80){ player_here: mes "^FF0000[Starter]^000000"; mes "^0000FF[Get Ready The Event Will Start Soon .]^000000"; close; } gm_only: debugmes "triggering gm_only label"; if ($@race != 0) goto L_Started; if ($@counting != 0) goto L_Started; if ($@racecount == 1) goto L_Started; end; L_Menu: mes "[Race Starter]"; mes "Please stay on the Eastern side of me."; menu "Start Race",L_Count,"Cancel",-; close; L_Count: set $@counting,1; mes "Counting down..."; addtimer 1000, "Starter::OnCount1000"; addtimer 2000, "Starter::OnCount2000"; addtimer 3000, "Starter::OnCount3000"; addtimer 4000, "Starter::OnCount4000"; announce strcharinfo(0) + "Started a countdown",1; announce "Get ready to race!",1; close; OnCount1000: announce "[3]",1; end; OnCount2000: announce "[2]",1; end; OnCount3000: announce "[1]",1; end; OnCount4000: emotion e_go; specialeffect EF_CHIMTO; announce "[GO!]",1; set $@race,1; set $@position,0; set $@counting,0; set $@raceid,rand(100000,999999); end; L_Started: debugmes "triggering L_Started label"; debugmes "$@position value : "+$@position; if ((getmapusers("pvp_y_1-5") < 3) && ($@position > 0)) goto L_Menu; if ($@position > 2) goto L_Menu; mes "[Starter]"; mes "Race in progress"; close; OnInit: debugmes "triggering OnInit label"; set $@race,0; set $@position,0; set $@racecount,0; end; } Thx for helping me , About $@position i didn't change any thing from the original script and it was working 100% , Just still getting nothing when gm clicks it , the menu should appear any way :/ ... Quote Link to comment Share on other sites More sharing options...
0 Kurofly Posted July 15, 2016 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 283 Reputation: 31 Joined: 07/08/14 Last Seen: January 15, 2022 Share Posted July 15, 2016 Are you sure there's no other script going with it?? What do you call original script? What worked and when did it start not to work? For what I understand, the npc might be spawned when the event begins and only a gm can render it active so that means the gm_only label should call the L_Menu label instead of the L_Start label (probably only in case the $@race variable has a value of 0) If I'm right with these, try this prontera,152,260,5 script Starter 733,{ if( getgmlevel() < 80){ player_here: mes "^FF0000[Starter]^000000"; mes "^0000FF[Get Ready The Event Will Start Soon .]^000000"; close; } gm_only: -- if ($@race != 0) goto L_Started; ++ if ($@race != 0) goto L_Menu; if ($@counting != 0) goto L_Started; if ($@racecount == 1) goto L_Started; end; L_Menu: mes "[Race Starter]"; mes "Please stay on the Eastern side of me."; menu "Start Race",L_Count,"Cancel",-; close; L_Count: set $@counting,1; mes "Counting down..."; addtimer 1000, "Starter::OnCount1000"; addtimer 2000, "Starter::OnCount2000"; addtimer 3000, "Starter::OnCount3000"; addtimer 4000, "Starter::OnCount4000"; announce strcharinfo(0) + "Started a countdown",1; announce "Get ready to race!",1; close; OnCount1000: announce "[3]",1; end; OnCount2000: announce "[2]",1; end; OnCount3000: announce "[1]",1; end; OnCount4000: emotion e_go; specialeffect EF_CHIMTO; announce "[GO!]",1; set $@race,1; set $@position,0; set $@counting,0; set $@raceid,rand(100000,999999); end; L_Started: if ((getmapusers("pvp_y_1-5") < 3) && ($@position > 0)) goto L_Menu; if ($@position > 2) goto L_Menu; mes "[Starter]"; mes "Race in progress"; close; OnInit: set $@race,0; set $@position,0; set $@racecount,0; end; } Still, apart from the $@race variable, nothing is ever set to anything so that's really weird Quote Link to comment Share on other sites More sharing options...
0 jehadmalek Posted July 16, 2016 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 27 Reputation: 0 Joined: 07/28/13 Last Seen: July 22, 2016 Author Share Posted July 16, 2016 Are you sure there's no other script going with it?? What do you call original script? What worked and when did it start not to work? For what I understand, the npc might be spawned when the event begins and only a gm can render it active so that means the gm_only label should call the L_Menu label instead of the L_Start label (probably only in case the $@race variable has a value of 0) If I'm right with these, try this prontera,152,260,5 script Starter 733,{ if( getgmlevel() < 80){ player_here: mes "^FF0000[Starter]^000000"; mes "^0000FF[Get Ready The Event Will Start Soon .]^000000"; close; } gm_only: -- if ($@race != 0) goto L_Started; ++ if ($@race != 0) goto L_Menu; if ($@counting != 0) goto L_Started; if ($@racecount == 1) goto L_Started; end; L_Menu: mes "[Race Starter]"; mes "Please stay on the Eastern side of me."; menu "Start Race",L_Count,"Cancel",-; close; L_Count: set $@counting,1; mes "Counting down..."; addtimer 1000, "Starter::OnCount1000"; addtimer 2000, "Starter::OnCount2000"; addtimer 3000, "Starter::OnCount3000"; addtimer 4000, "Starter::OnCount4000"; announce strcharinfo(0) + "Started a countdown",1; announce "Get ready to race!",1; close; OnCount1000: announce "[3]",1; end; OnCount2000: announce "[2]",1; end; OnCount3000: announce "[1]",1; end; OnCount4000: emotion e_go; specialeffect EF_CHIMTO; announce "[GO!]",1; set $@race,1; set $@position,0; set $@counting,0; set $@raceid,rand(100000,999999); end; L_Started: if ((getmapusers("pvp_y_1-5") < 3) && ($@position > 0)) goto L_Menu; if ($@position > 2) goto L_Menu; mes "[Starter]"; mes "Race in progress"; close; OnInit: set $@race,0; set $@position,0; set $@racecount,0; end; } Still, apart from the $@race variable, nothing is ever set to anything so that's really weird Simply , its morroc raceway Trying to make Starter only for GM , hope u can help me .. Quote Link to comment Share on other sites More sharing options...
0 Kurofly Posted July 16, 2016 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 283 Reputation: 31 Joined: 07/08/14 Last Seen: January 15, 2022 Share Posted July 16, 2016 Should have said so sooner xD I was totally lost there Nothing simpler: L_Menu: mes "[Race Starter]"; mes "Please stay on the Eastern side of me."; -- menu "Start Race",L_Count,"Cancel",-; ++ if(getgmlevel() >= 80) menu "Start Race",L_Count,"Cancel",-; close; L_Count: Quote Link to comment Share on other sites More sharing options...
0 jehadmalek Posted July 16, 2016 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 27 Reputation: 0 Joined: 07/28/13 Last Seen: July 22, 2016 Author Share Posted July 16, 2016 Should have said so sooner xD I was totally lost there Nothing simpler: L_Menu: mes "[Race Starter]"; mes "Please stay on the Eastern side of me."; -- menu "Start Race",L_Count,"Cancel",-; ++ if(getgmlevel() >= 80) menu "Start Race",L_Count,"Cancel",-; close; L_Count: Can u paste the full starter *After trying* PLEASE , & thx thx v muuch Quote Link to comment Share on other sites More sharing options...
0 jehadmalek Posted July 17, 2016 Group: Members Topic Count: 12 Topics Per Day: 0.00 Content Count: 27 Reputation: 0 Joined: 07/28/13 Last Seen: July 22, 2016 Author Share Posted July 17, 2016 I don't have the pvp_y_<x>-5 maps, I can't test it. What's the error? If there's no error what doesn't work? Full starter: //Counts down and starts race pvp_y_1-5,145,269,5 script Starter 733,{ if ($@race != 0) goto L_Started; if ($@counting != 0) goto L_Started; if ($@racecount == 1) goto L_Started; L_Menu: mes "[Race Starter]"; mes "Please stay on the Eastern side of me."; // menu "Start Race",L_Count,"Cancel",-; if (getgmlevel() >= 80) menu "Start Race",L_Count,"Cancel",-; close; L_Count: set $@counting,1; mes "Counting down..."; addtimer 1000, "Starter::OnCount1000"; addtimer 2000, "Starter::OnCount2000"; addtimer 3000, "Starter::OnCount3000"; addtimer 4000, "Starter::OnCount4000"; announce strcharinfo(0) + "Started a countdown",1; announce "Get ready to race!",1; close; OnCount1000: announce "[3]",1; end; OnCount2000: announce "[2]",1; end; OnCount3000: announce "[1]",1; end; OnCount4000: emotion e_go; specialeffect EF_CHIMTO; announce "[GO!]",1; set $@race,1; set $@position,0; set $@counting,0; set $@raceid,rand(100000,999999); end; L_Started: if ((getmapusers("pvp_y_1-5") < 3) && ($@position > 0)) goto L_Menu; if ($@position > 2) goto L_Menu; mes "[Starter]"; mes "Race in progress"; close; OnInit: set $@race,0; set $@position,0; set $@racecount,0; end; } Thaaaaank v v v v v v muccccchhhhh <3 <3 Quote Link to comment Share on other sites More sharing options...
Question
jehadmalek
Hi ,
what i want to do is when player clicks the NPC it goes to player_here & when GM Does it goes to gm_only
& Thx
Link to comment
Share on other sites
13 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.