Snurayroth Posted February 19, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 02/16/12 Last Seen: June 9, 2017 Share Posted February 19, 2012 (edited) Hello, Im running this script via custom command and its working and i never got an problem with it before: - script XXXX -1,{ if(alreadyopen == 1) goto L_open; set alreadyopen,1; getmapxy(@roflmap$,@roflx,@rofly,0,strcharinfo(0)); warp @roflmap$,@roflx,@rofly; goto L_lol; L_lol: sleep2 100; //start mes "XXXXXXXXXXXXXXXX"; mes "XXXXXXXXXXXXXXXXXXXXX"; mes "XXXXXXXXXXXXXXXXXXXXXXXXXX"; mes "XXXXXXXXXXXXXXXXXXXXXXXX"; next; menu "- A",L_A, "- B",L_B, "- C",L_C, "- D",L_D, "- Close",L_Close; Info: My Server is running on my Computer. Im playing on the same Computer where the Server is running. Other People connect to it via Hamachi to find Bugs for me. When i am using the Custom command to execute this Script its working perfectly. But when other People using the Custom Command to execute this Script it doesnt work properly, he get warped and seeing this like me too: mes "XXXXXXXXXXXXXXXX"; mes "XXXXXXXXXXXXXXXXXXXXX"; mes "XXXXXXXXXXXXXXXXXXXXXXXXXX"; mes "XXXXXXXXXXXXXXXXXXXXXXXX"; But they dont see the "next" button there and the "menu" doesnt popup. The Map Server is giving me this error: Debug: npc_scriptcont: 'Unknown NPC' <sd->npc_id=0> is not FAKE_NPC <id=110000030>. I hope u can help me ! Thanks ! Here some screenshots: for me it looks like this: http://www.picfront.org/d/8wOS and for other people it is looking like this: http://www.picfront.org/d/8wOO Nobody know an solution ? i already tried to spilt this script and put the parts after the warping in a function and called it via callfunc but that had nothing changed still the same error. Does anyone know an solution for it? regards, Snurayroth Edited February 18, 2012 by Snurayroth Quote Link to comment Share on other sites More sharing options...
ComeTower Posted February 19, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 15 Reputation: 10 Joined: 02/19/12 Last Seen: May 9, 2012 Share Posted February 19, 2012 where is the label L_open? post the entire script please D: Quote Link to comment Share on other sites More sharing options...
Snurayroth Posted February 19, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 02/16/12 Last Seen: June 9, 2017 Author Share Posted February 19, 2012 (edited) Ok here is the complete script: - script XXX -1,{ if(alreadyopen == 1) goto L_open; set alreadyopen,1; getmapxy(@roflmap$,@roflx,@rofly,0,strcharinfo(0)); warp @roflmap$,@roflx,@rofly; goto L_lol; L_lol: sleep2 100; //start mes "XXXXXXXXXX"; mes "XXXXXXXXXXX"; mes "XXXXXXXXXX"; mes "XXXXXXXXXXXXXX"; next; menu "- A",L_A, "- B",L_B, "- C",L_C, "- D",L_D, "- Close",L_Close; L_back: //start mes "XXXXXXXXXX"; mes "XXXXXXXXXXX"; mes "XXXXXXXXXX"; mes "XXXXXXXXXXXXXX"; next; menu "- A",L_A, "- B",L_B, "- C",L_C, "- D",L_D, "- Close",L_Close; L_A: mes "XX"; mes "XX"; mes "XX"; mes "XX"; next; menu "- Back",L_back, "- Close",L_Close; close; L_B: mes "XX"; mes "XX"; mes "XX"; mes "XX"; next; menu "- Back",L_back, "- Close",L_Close; close; L_C: mes "XX"; mes "XX"; mes "XX"; mes "XX"; next; menu "- Back",L_back, "- Close",L_Close; close; L_D: mes "XX"; mes "XX"; mes "XX"; mes "XX"; next; menu "- Back",L_back, "- Close",L_Close; close; L_Close: mes "XX"; mes "XX"; mes "XX"; mes "XX"; set alreadyopen,0; close; L_open: end; } I also tried this script before without the label "L_lol" and it doesnt worked ^^ Edited February 19, 2012 by Arcenciel Codeboxed Quote Link to comment Share on other sites More sharing options...
ComeTower Posted February 19, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 15 Reputation: 10 Joined: 02/19/12 Last Seen: May 9, 2012 Share Posted February 19, 2012 1- in L_open use 'close;' cus end will stop the script but the window will keep open. 2- you don't need a 'close;' after every menu. they'll jump to the next part of the script making the close useless. 3- #1 i guess is the only error, and #2 is just something to make your code 'clean' Quote Link to comment Share on other sites More sharing options...
Snurayroth Posted February 19, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 02/16/12 Last Seen: June 9, 2017 Author Share Posted February 19, 2012 1- in L_open use 'close;' cus end will stop the script but the window will keep open. 2- you don't need a 'close;' after every menu. they'll jump to the next part of the script making the close useless. 3- #1 i guess is the only error, and #2 is just something to make your code 'clean' The error is still the same D: Quote Link to comment Share on other sites More sharing options...
ComeTower Posted February 19, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 15 Reputation: 10 Joined: 02/19/12 Last Seen: May 9, 2012 Share Posted February 19, 2012 you want to know what's wrong or can i try to make one like this but working? Quote Link to comment Share on other sites More sharing options...
deltadestiny Posted February 19, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 23 Reputation: 2 Joined: 02/17/12 Last Seen: February 27, 2013 Share Posted February 19, 2012 It looks like using next in a floating NPC causes an error. *next; ... If no window is currently on screen, one will be created, but once the invoking character clicks on it, a warning is thrown on the server console and the script will terminate. I was able to reproduce the same error using the following code: prontera,153,170,4 script Temptest 46,{ set @testrid, getcharid(0); doevent "XXX::OnDo"; end; } - script XXX -1,{ OnDo: attachrid @testrid; getmapxy(@roflmap$,@roflx,@rofly,0,strcharinfo(0)); warp @roflmap$,@roflx,@rofly; L_lol: mes "L_lol"; mes "XXXXXXXXXXX"; next; // NOTE menu "- A",L_A, "- Close",L_Close; L_back: mes "L_back"; mes "XXXXXXXXXXX"; next; menu "- A",L_A, "- Close",L_Close; L_A: mes "XX"; mes "XX"; mes "XX"; mes "XX"; next; menu "- Back",L_back, "- Close",L_Close; L_Close: mes "XX"; mes "XX"; mes "XX"; mes "XX"; L_open: close; } NOTE: If you comment out the 'next;' under the L_lol label, it is possible to access the menu that comes after it. However, choosing any of the menu resulted in either being disconnected from the server or my client crashing. There's also a warning message that looks like this: [Warning]: Invalid menu selection on npc 110076110:'XXX' - got 1, valid range is [1..0] However, if you replace the upper part of the code with the following, the script works just fine. So I'm assuming that your error is most likely related to the one mentioned in the description for next;, and by creating a 'valid' window before proceeding into your own code, it should bypass the error. But since you're executing it from a custom command, I'm not sure how you are going to do it... prontera,153,170,4 script Temptest 46,{ set @testrid, getcharid(0); mes "abcde"; getmapxy(@roflmap$,@roflx,@rofly,0,strcharinfo(0)); warp @roflmap$,@roflx,@rofly; doevent "XXX::OnDo"; end; } - script XXX -1,{ OnDo: attachrid @testrid; L_lol: // content from this line and below remains the same Quote Link to comment Share on other sites More sharing options...
Snurayroth Posted February 19, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 02/16/12 Last Seen: June 9, 2017 Author Share Posted February 19, 2012 you want to know what's wrong or can i try to make one like this but working? I would be happy if you tell it to me and yes u could make a working one like this if u want to. It looks like using next in a floating NPC causes an error. *next; ... If no window is currently on screen, one will be created, but once the invoking character clicks on it, a warning is thrown on the server console and the script will terminate. I was able to reproduce the same error using the following code: prontera,153,170,4 script Temptest 46,{ set @testrid, getcharid(0); doevent "XXX::OnDo"; end; } - script XXX -1,{ OnDo: attachrid @testrid; getmapxy(@roflmap$,@roflx,@rofly,0,strcharinfo(0)); warp @roflmap$,@roflx,@rofly; L_lol: mes "L_lol"; mes "XXXXXXXXXXX"; next; // NOTE menu "- A",L_A, "- Close",L_Close; L_back: mes "L_back"; mes "XXXXXXXXXXX"; next; menu "- A",L_A, "- Close",L_Close; L_A: mes "XX"; mes "XX"; mes "XX"; mes "XX"; next; menu "- Back",L_back, "- Close",L_Close; L_Close: mes "XX"; mes "XX"; mes "XX"; mes "XX"; L_open: close; } NOTE: If you comment out the 'next;' under the L_lol label, it is possible to access the menu that comes after it. However, choosing any of the menu resulted in either being disconnected from the server or my client crashing. There's also a warning message that looks like this: [Warning]: Invalid menu selection on npc 110076110:'XXX' - got 1, valid range is [1..0] However, if you replace the upper part of the code with the following, the script works just fine. So I'm assuming that your error is most likely related to the one mentioned in the description for next;, and by creating a 'valid' window before proceeding into your own code, it should bypass the error. But since you're executing it from a custom command, I'm not sure how you are going to do it... prontera,153,170,4 script Temptest 46,{ set @testrid, getcharid(0); mes "abcde"; getmapxy(@roflmap$,@roflx,@rofly,0,strcharinfo(0)); warp @roflmap$,@roflx,@rofly; doevent "XXX::OnDo"; end; } - script XXX -1,{ OnDo: attachrid @testrid; L_lol: // content from this line and below remains the same Umm... ur doing it using an NPC but i can only use an Script to do it because i need to execute it with the custom command i have. I tried it to do it but seems like it dont working that way i think.... :/ Whatever, thank you both for helping me ! I will still try to find an solution by myself... >< Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 19, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Thursday at 04:49 PM Share Posted February 19, 2012 LOL..what is this ? i cant understand what you want ur script do to.. i just saw...so many XXXXX and menu , menu...and menu.... O.O Quote Link to comment Share on other sites More sharing options...
Snurayroth Posted February 19, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 02/16/12 Last Seen: June 9, 2017 Author Share Posted February 19, 2012 LOL..what is this ? i cant understand what you want ur script do to.. i just saw...so many XXXXX and menu , menu...and menu.... O.O I only censored the dialogue with "XXXX" ^^ Quote Link to comment Share on other sites More sharing options...
deltadestiny Posted February 19, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 23 Reputation: 2 Joined: 02/17/12 Last Seen: February 27, 2013 Share Posted February 19, 2012 (edited) Snurayroth, I have a vague idea that might work. Instead of using a floating NPC, make it something like this: mapname,xcoor,ycoor script NPC_Name -1,{ OnEventName: //attach rid of player //place your text in here end; } Then alter your custom command so that it saves the character RID into a variable and runs NPC_Name::OnEventName. I'm not exactly sure it'll work though, but that's an alternative I thought of. I'm not familiar with custom commands, so I can't test it myself. Sorry =( Edited February 19, 2012 by deltadestiny Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 19, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Thursday at 04:49 PM Share Posted February 19, 2012 @TS...mind to explain your script ? i mean what it does ?? For Example : getmapxy(@roflmap$,@roflx,@rofly,0,strcharinfo(0)); warp @roflmap$,@roflx,@rofly; goto L_lol; why are you warping the character back to the same coordinate ? Quote Link to comment Share on other sites More sharing options...
Snurayroth Posted February 19, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 02/16/12 Last Seen: June 9, 2017 Author Share Posted February 19, 2012 (edited) @TS...mind to explain your script ? i mean what it does ?? For Example : getmapxy(@roflmap$,@roflx,@rofly,0,strcharinfo(0)); warp @roflmap$,@roflx,@rofly; goto L_lol; why are you warping the character back to the same coordinate ? Ok, ill try to explain it a bit, so as u know i createt a custom command that all normal players can use. Example: this command open an "npc-menu"/"a mes window" with information about other commands or whatever Its, working perfectly. Now u asking me why i want to warp the character back to the same coordinates! Because: When an player walking into an Warping Portal and using this command in this time, than the player can stay on the Warping Portal without get warped and i want to prevent that. Its working for me 100% but as i said before when other player use this command it dont work oO PS: I dont use the normal Warping Portals. I use this kind of it: hs_kalmo.gat,102,177,4 script inwarp1 45,2,2,{ if (BaseLevel >= 15) { warp "hs_kalmo_in.gat",48,105; end; } end; } Edited February 19, 2012 by Snurayroth Quote Link to comment Share on other sites More sharing options...
Emistry Posted February 19, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Thursday at 04:49 PM Share Posted February 19, 2012 you mean something like this ?? NPC Sketch - Pastebin Quote Link to comment Share on other sites More sharing options...
Snurayroth Posted February 19, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 02/16/12 Last Seen: June 9, 2017 Author Share Posted February 19, 2012 (edited) you mean something like this ?? NPC Sketch - Pastebin Yes, nothing more than that. That is it what i execute with my custom command. And i want to warp the character back to the same coordinate to prevent that they can stay on the Warping Portal like u can see here: http://image-upload.de/image/Io2o0l/81a729068e.jpg and after closing this Script: http://image-upload..../92da5afb74.jpg ^^ xD I only want to prevent that ^^ Edited February 19, 2012 by Snurayroth Quote Link to comment Share on other sites More sharing options...
Snurayroth Posted February 23, 2012 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 02/16/12 Last Seen: June 9, 2017 Author Share Posted February 23, 2012 I got an solution for it, when i increase the sleep2 value in my script it is working oO ! ^^ solved but its still possible to get on the warp but i got a new idea to fix that... thanks for helping me to all !! [sOLVED] Quote Link to comment Share on other sites More sharing options...
Question
Snurayroth
Hello,
Im running this script via custom command and its working and i never got an problem with it before:
Info:
My Server is running on my Computer.
Im playing on the same Computer where the Server is running.
Other People connect to it via Hamachi to find Bugs for me.
When i am using the Custom command to execute this Script its working perfectly.
But when other People using the Custom Command to execute this Script it doesnt work properly,
he get warped and seeing this like me too:
But they dont see the "next" button there and the "menu" doesnt popup.
The Map Server is giving me this error:
I hope u can help me ! Thanks !
Here some screenshots:
for me it looks like this:
http://www.picfront.org/d/8wOS
and for other people it is looking like this:
http://www.picfront.org/d/8wOO
Nobody know an solution ? i already tried to spilt this script and put the parts after the warping in a function and called it via callfunc but that had nothing changed still the same error.
Does anyone know an solution for it?
regards,
Snurayroth
Edited by SnurayrothLink to comment
Share on other sites
15 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.