Jump to content

caos51

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by caos51

  1. You have it on discord! (Not sharing as requested)
  2. Send me your full script, probably the missing ";" is on the previous line.
  3. And... what is a credit and how are stored in your server? It´s a... variable how is named? It´s an easy script ?
  4. I don´t know if there is an easiest way to do it. But... you can store each monster GID and modify their AI with a function.
  5. What it does right now if you put more than 100 only does 100 anyways. If you want an error, change: if(.@quantity > 100){set .@quantity,100;} for this: if(.@quantity > 100){goto Lnenough;}
  6. I don´t know if you copied it before my last edit, just in case copy it again jajajaja (fixed a ")" in delete item).
  7. Uhm... I´ll try yo explain. Now you have a configuration part: //Change to what requirements you want to use set .@item[0],713,970,607; //Array with items IDs to use (only 1 of them). //set .@itemq[0],1,3,1; //Uncomment if you want to use different quantities for each item, same order, array with quentities to use. set .@zeny,100000; //Money required. set .@result,607; //The obtained item on success. The first array .@item[0] defines the items ID of the brewing formula. You can put from 1-254 different items separated by ",". The example are the items configured in your script 713,970,607. But if you only configure this, it will try to get 1 of each item... but why if you want to pick one of this... three of that... The second (and commented) variable is for that: //set .@itemq[0],1,3,1; if you uncomment this, it will take 1 for the first item, 3 for the second and 1 of the third one. They are in the same order .@item[0],<ITEM ID 1>,<ITEM ID 2>,<ITEM ID 3>...; .@itemq[0],<ITEM ID 1 QUANTITY>,<ITEM ID 2 QUANTITY>,<ITEM ID 3 QUANTITY>...; Then another two vars with the zenys required and the ITEM ID of the brew result. Maybe more than 200 trys is to much and we can limit the imput to max 100. What do you think? I´m putting some corrections in this new version and with a limit of 100 each try (I think maybe the array vars where not being configured correctly). Try this: //======Name======================================== // Potion Brewer NPC //======Version===================================== // 1.0 //======Author(s)=================================== // Sandbox //======Comments==================================== // In loving memory of AstralRO //================================================== //Just for fun... don´t know if it will work! function script int__ { .@i = getstrlen( .@str$ = getarg(0) ) -3; .@is_negative = charat( .@str$, 0 ) == "-"; while ( .@i > .@is_negative ) { .@str$ = insertchar( .@str$, ",", .@i ); .@i -= 3; } return .@str$; } //Change coordinates prontera,144,180,3 script Brewho 46,{ //Configuration, items and zenys: //Change to what requirements you want to use setarray(.@item[0],713,970,607); //Array with items IDs to use (only 1 of them). //setarray(.@itemq[0],1,3,1); //Uncomment if you want to use different quantities for each item, same order, array with quentities to use. set .@zeny,100000; //Money required. set .@result,607; //The obtained item on success. mes "[^0000FF Brewho ^000000]"; mes "Hello, I can teach you how to brew! Teach you, teach you how to brew ^000088Astral Beer^000000"; //Change to what kind of potion do you want to brew menu "Teach me please!",-; next; mes "[^0000FF Brewho ^000000]"; mes "Okay, you'll be needing these.."; mes "^000088"; for( .@i = 0; .@i < getarraysize(.@item); .@i++ ){if(.@itemq[.@i]>0){mes ""+getitemname(.@item[.@i])+" x"+.@itemq[.@i]+"";}else{mes ""+getitemname(.@item[.@i])+"";}} mes "^000000"; mes "Also, a talent fee of "+int__(.@zeny)+" z!"; menu "I've got them master brewer!",-; next; mes "(How many tries?)"; mes "Max: 100"; input .@quantity; next; if(.@quantity < 1){goto Lnenough;} if(.@quantity > 100){set .@quantity,100;} //Checking requirements for( .@i = 0; .@i < getarraysize(.@item); .@i++ ){if(.@itemq[.@i]>0){if(countitem(.@item[.@i]) < (.@quantity*.@itemq[.@i])){goto Lnenough;}}else{if(countitem(.@item[.@i]) < .@quantity){goto Lnenough;}}} if(Zeny < .@zeny){goto Lnenough;} //Must match the requirements above. mes "[^0000FF Brewho ^000000]"; mes "Let's see the results!"; //Uncomment to enable casting effect progressbar "ffff00",1; //Deleting the items! for( .@i = 0; .@i < getarraysize(.@item); .@i++ ){if(.@itemq[.@i]>0){delitem .@item[.@i],(.@itemq[.@i]*.@quantity);}else{delitem .@item[.@i],.@quantity;}} set Zeny,Zeny-.@zeny; for( .@i = 0; .@i < .@quantity; .@i++ ){ //Lets goooo with the chances if(BrewLvl == 0){set @brewchance,rand(1,5);} if(BrewLvl == 1){set @brewchance,rand(1,4);} if(BrewLvl == 2){set @brewchance,rand(1,3);} if(BrewLvl == 3){set @brewchance,rand(1,2);} if(@brewchance == 1) { misceffect 305; set BrewExp,BrewExp+1; getnameditem .@result,strcharinfo(0); //Change Item ID, Must match the potion to be made! set .@ok,.@ok+1; //goto Lsuccess; } else { misceffect 306; set .@ko,.@ko+1; //goto Lfail; } } //Now let´s see the results next; mes "[^0000FF Brewho ^000000]"; //mes "Congratulations! You've succeeded!"; mes "Well, well... let me see."; mes "You succeeded "+.@ok+" time/s and failed "+.@ko+" time/s."; if(BrewExp < 10000){dispbottom "You've gained "+.@ok+" Brewing Exp.";} if(BrewLvl == 0 && BrewExp > 999){ set BrewLvl,1; dispbottom "Congratulations! Your Brewing Mastery is now Level 1!"; announce strcharinfo(0)+"'s Brewing Mastery reached Level 1!",bc_all,0x00FFFF; } else if(BrewLvl == 1 && BrewExp > 4999) { set BrewLvl,2; dispbottom "Congratulations! Your Brewing Mastery is now Level 2!"; announce strcharinfo(0)+"'s Brewing Mastery reached Level 2!",bc_all,0x00FFFF; } else if(BrewLvl == 2 && BrewExp > 9999) { set BrewLvl,3; dispbottom "Congratulations! Your Brewing Mastery is now Level 3!"; announce strcharinfo(0)+"'s Brewing Mastery reached Max Level!",bc_all,0x00FFFF; set BrewExp,0; //Comment this if u don´t wanna clean up this var for the player (max lvl so exp not needed) } close; Lnenough: mes "[^0000FF Brewho ^000000]"; mes "Are you trying to brew me out!?"; close; } PS: I could test this on an offline server and seems to be working fine now.
  8. Ok, here´s a corrected version should fix pretty much all but the second one (maybe it´s some emulator cap? wich number get stuck?) //======Name======================================== // Potion Brewer NPC //======Version===================================== // 1.0 //======Author(s)=================================== // Sandbox //======Comments==================================== // In loving memory of AstralRO //================================================== //Just for fun... don´t know if it will work! function script int__ { .@i = getstrlen( .@str$ = getarg(0) ) -3; .@is_negative = charat( .@str$, 0 ) == "-"; while ( .@i > .@is_negative ) { .@str$ = insertchar( .@str$, ",", .@i ); .@i -= 3; } return .@str$; } //Change coordinates prontera,144,180,3 script Brewho 46,{ //Configuration, items and zenys: //Change to what requirements you want to use set .@item[0],713,970,607; //Array with items IDs to use (only 1 of them). //set .@itemq[0],1,3,1; //Uncomment if you want to use different quantities for each item, same order, array with quentities to use. set .@zeny,100000; //Money required. set .@result,607; //The obtained item on success. mes "[^0000FF Brewho ^000000]"; mes "Hello, I can teach you how to brew! Teach you, teach you how to brew ^000088Astral Beer^000000"; //Change to what kind of potion do you want to brew menu "Teach me please!",-; next; mes "[^0000FF Brewho ^000000]"; mes "Okay, you'll be needing these.."; mes "^000088"; for( .@i = 0; .@i < getarraysize(.@item); .@i++ ){if(.@itemq[.@i]>0){mes ""+getitemname(.@item[.@i])+" x"+.@itemq[.@i]+"";}else{mes ""+getitemname(.@item[.@i])+"";}} mes "^000000"; mes "Also, a talent fee of "+int__(.@zeny)+" z!"; menu "I've got them master brewer!",-; next; input .@quantity; next; if(.@quantity < 1){goto Lnenough;} //Checking requirements for( .@i = 0; .@i < getarraysize(.@item); .@i++ ){if(.@itemq[.@i]>0){if(countitem(.@item[.@i]) < (.@quantity*.@itemq[.@i])){goto Lnenough;}}else{if(countitem(.@item[.@i]) < .@quantity){goto Lnenough;}}} if(Zeny < .@zeny){goto Lnenough;} //Must match the requirements above. mes "[^0000FF Brewho ^000000]"; mes "Let's see the results!"; //Uncomment to enable casting effect progressbar "ffff00",1; //Deleting the items! for( .@i = 0; .@i < getarraysize(.@item); .@i++ ){if(.@itemq[.@i]>0){delitem .@item[.@i],(.@itemq[.@i]*.@quantity));}else{delitem .@item[.@i],.@quantity;}} set Zeny,Zeny-.@zeny; for( .@i = 0; .@i < .@quantity; .@i++ ){ //Lets goooo with the chances if(BrewLvl == 0){set @brewchance,rand(1,5);} if(BrewLvl == 1){set @brewchance,rand(1,4);} if(BrewLvl == 2){set @brewchance,rand(1,3);} if(BrewLvl == 3){set @brewchance,rand(1,2);} if(@brewchance == 1) { misceffect 305; set BrewExp,BrewExp+1; getnameditem .@result,strcharinfo(0); //Change Item ID, Must match the potion to be made! set .@ok,.@ok+1; //goto Lsuccess; } else { misceffect 306; set .@ko,.@ko+1; //goto Lfail; } } //Now let´s see the results next; mes "[^0000FF Brewho ^000000]"; //mes "Congratulations! You've succeeded!"; mes "Well, well... let me see."; mes "You succeeded "+.@ok+" time/s and failed "+.@ko+" time/s."; if(BrewExp < 10000){dispbottom "You've gained "+.@ok+" Brewing Exp.";} if(BrewLvl == 0 && BrewExp > 999){ set BrewLvl,1; dispbottom "Congratulations! Your Brewing Mastery is now Level 1!"; announce strcharinfo(0)+"'s Brewing Mastery reached Level 1!",bc_all,0x00FFFF; } else if(BrewLvl == 1 && BrewExp > 4999) { set BrewLvl,2; dispbottom "Congratulations! Your Brewing Mastery is now Level 2!"; announce strcharinfo(0)+"'s Brewing Mastery reached Level 2!",bc_all,0x00FFFF; } else if(BrewLvl == 2 && BrewExp > 9999) { set BrewLvl,3; dispbottom "Congratulations! Your Brewing Mastery is now Level 3!"; announce strcharinfo(0)+"'s Brewing Mastery reached Max Level!",bc_all,0x00FFFF; set BrewExp,0; //Comment this if u don´t wanna clean up this var for the player (max lvl so exp not needed) } close; Lnenough: mes "[^0000FF Brewho ^000000]"; mes "Are you trying to brew me out!?"; close; } Also I don´t understand your point 5 and please, test again the 4 one (I don´t know how it happend). Regards!
  9. You can check all the modes here: https://github.com/rathena/rathena/blob/master/doc/mob_db_mode_list.txt I put... can move, can attack, and assist ? It was nothing thank you!
  10. Then... try this? getmapxy(.@mapname$,.@mapx,.@mapy); clone .@mapname$,.@mapx,.@mapy,"OnMyCloneDies",getcharid(0),getcharid(0),137,1,0;
  11. Maybe just using *atcommand to let the user use @slaveclone through a script?
  12. How is the behaviour? I mean, do you get an error or just it´s not working for that map? Also, please tell me the map name you added.
  13. I did a few modifications... read the comments and if you have any doubt please tell me: //======Name======================================== // Potion Brewer NPC //======Version===================================== // 1.0 //======Author(s)=================================== // Sandbox //======Comments==================================== // In loving memory of AstralRO //================================================== //Just for fun... don´t know if it will work! function script int__ { .@i = getstrlen( .@str$ = getarg(0) ) -3; .@is_negative = charat( .@str$, 0 ) == "-"; while ( .@i > .@is_negative ) { .@str$ = insertchar( .@str$, ",", .@i ); .@i -= 3; } return .@str$; } //Change coordinates prontera,144,180,3 script Brewho 46,{ //Configuration, items and zenys: //Change to what requirements you want to use set .@item[0],713,970,607; //Array with items IDs to use (only 1 of them). //set .@itemq[0],1,3,1; //Uncomment if you want to use different quantities for each item, same order, array with quentities to use. set .@zeny,100000; //Money required. set .@result,607; //The obtained item on success. mes "[^0000FF Brewho ^000000]"; mes "Hello, I can teach you how to brew! Teach you, teach you how to brew ^000088Astral Beer^000000"; //Change to what kind of potion do you want to brew menu "Teach me please!",-; next; mes "[^0000FF Brewho ^000000]"; mes "Okay, you'll be needing these.."; mes "^000088"; for( .@i = 0; .@i < getarraysize(.@item); .@i++ ){if(.@itemq[.@i]>0){mes ""+getitemname(.@item[.@i])+" x"+.@itemq[.@i]+"";}else{mes ""+getitemname(.@item[.@i])+"";}} mes "^000000"; mes "Also, a talent fee of "+int__(.@zeny)+" z!"; menu "I've got them master brewer!",-; next; input .@quantity; next; //Checking requirements for( .@i = 0; .@i < getarraysize(.@item); .@i++ ){if(.@itemq[.@i]>0){if(countitem(.@item[.@i]) < (.@quantity*.@itemq[.@i])){goto Lnenough;}}else{if(countitem(.@item[.@i]) < .@quantity){goto Lnenough;}}} if(Zeny < .@zeny) goto Lnenough; //Must match the requirements above. mes "[^0000FF Brewho ^000000]"; mes "Let's see the results!"; //Uncomment to enable casting effect progressbar "ffff00",1; //Deleting the items! for( .@i = 0; .@i < getarraysize(.@item); .@i++ ){if(.@itemq[.@i]>0){delitem .@item[.@i],(.@itemq[.@i]*.@quantity));}else{delitem .@item[.@i],.@quantity;}} set Zeny,Zeny-.@zeny; //Lets goooo with the chances if(BrewLvl == 0){set @brewchance,rand(1,5);} if(BrewLvl == 1){set @brewchance,rand(1,4);} if(BrewLvl == 2){set @brewchance,rand(1,3);} if(BrewLvl == 3){set @brewchance,rand(1,2);} for( .@i = 0; .@i < .@quantity; .@i++ ){ if(@brewchance == 1) { misceffect 305; set BrewExp,BrewExp+1; getnameditem .@result,strcharinfo(0); //Change Item ID, Must match the potion to be made! set .@ok,.@ok+1; //goto Lsuccess; } else { misceffect 306; set .@ko,.@ko+1; //goto Lfail; } } //Now let´s see the results next; mes "[^0000FF Brewho ^000000]"; //mes "Congratulations! You've succeeded!"; mes "Well, well... let me see."; mes "You succeeded "+.@ok+" time/s and failed "+.@ko+" time/s."; if(BrewExp < 10000){dispbottom "You've gained "+.@ok+" Brewing Exp.";} if(BrewLvl == 0 && BrewExp > 999){ set BrewLvl,1; dispbottom "Congratulations! Your Brewing Mastery is now Level 1!"; announce strcharinfo(0)+"'s Brewing Mastery reached Level 1!",bc_all,0x00FFFF; } else if(BrewLvl == 1 && BrewExp > 4999) { set BrewLvl,2; dispbottom "Congratulations! Your Brewing Mastery is now Level 2!"; announce strcharinfo(0)+"'s Brewing Mastery reached Level 2!",bc_all,0x00FFFF; } else if(BrewLvl == 2 && BrewExp > 9999) { set BrewLvl,3; dispbottom "Congratulations! Your Brewing Mastery is now Level 3!"; announce strcharinfo(0)+"'s Brewing Mastery reached Max Level!",bc_all,0x00FFFF; set BrewExp,0; //Comment this if u don´t wanna clean up this var for the player (max lvl so exp not needed) } close; Lnenough: mes "[^0000FF Brewho ^000000]"; mes "Are you trying to brew me out!?"; close; } Now should be easier to configure and use ? I did not test it so... maybe have a few errors ?. PD: Sorry for the typos I was in a hurry xD
  14. I don´t know if you can specify what is exactly not workin, but in any case... I see some strange things like: set .@limits[.@i[0]], strcharinfo(0); if limits are: setarray .@limits[0], $racelk, $racepally, $racehw, $raceprof, $racesniper, $raceclown, $racegypsy, $racehp, $racechamp, $racews, $racecreo, $racesinx, $racestalker, $racesl, $racesg, $raceninja, $racegs, $racesn; and .@i is not an array, that makes no sense for me... it should be just .@limits[.@i] Also the first part of the script when you declare some of the variables with the jobs involved... there is nothing calling that part, right? I was expecting some OnInit label or something, but maybe this is not all the code.
  15. Have you tried to "summon" the monster instead of just using the monster+setunitdata? *summon "monster name",<monster id>{,<Time Out>{,"event label"}}; This command will summon a monster. (see also 'monster') Unlike monsters spawned with other commands, this one will set up the monster to fight to protect the invoking character. Monster name and mob id obey the same rules as the one given at the beginning of this document for permanent monster spawns with the exceptions mentioned when describing 'monster' command. The effect for the skill 'Call Homunculus' will be displayed centered on the invoking character. Timeout is the time in milliseconds the summon lives, and is set default to 60000 (1 minute). Note that also the value 0 will set the timer to default, and it is not possible to create a spawn that lasts forever. If an event label is given, upon the monster being killed, the event label will run as if by 'donpcevent'. Returned value is the game ID of the spawned monster. Maybe just with this it will do the trick.
  16. It´s strange to ask about it but... the schema name is "ragnarok"? (if not should have more db errors, that´s the strange thing). Please, post it if you can.
  17. Please, add the script code (It will make it easier). Anyway, it seems you are trying to math operate a string...? The second one... try to @spawn 3161 (it seems a monster id not used).
  18. map-server console say something? look if there are any errors.
  19. Nice script Emistry. Havin one example and translating it: Novice >> First >> Second >> Second >> Second >> Third Novice >> Swordman >> Knight >> Priest >> Crusader >> Royal Guard Thinking as if you are already a RG, you will be able to get back at knight or priest with the same skills it had? (also at anytime using an item?)
  20. It´s possible, but requieres some... complicate changes. First you will need to create some new tables on DB imitating the skill table and char table and then make a few scripting functions to read from query_sql to finally so some jobchanges and skill commands. I´m not going to lie, it´s complicated and I doubt someone will share it for free. Also there are some things to consider, like... you will have separated stats for each player class? In that case, you will need to think in 3rd jobs and the base lvl cap... Possible, but complicated.
  21. Oooookkkk... (man this is gonna hurt my mind a lot, better you appreciate it) Let´s not call it a disaster, could be a great idea but... you will need to improve your scripting skills a lot if you want to develop something that complicate. Let´s go little by little... prontera,153,173,5 script sobrevivencia 85,{ .@fome$ = "[Fome]"; .@sede$ = "[Sede]"; .@sono$ = "[Sono]"; .@dubarma$ = "[DubArma]"; .@dubarmadura$ = "[DubArmadura]"; getcharid(0); You declare 5 scope variables with some names. Ok: ".@" - A scope variable. They are unique to the instance and scope. Each instance has its own scope that ends when the script ends. Calling a function with callsub/callfunc starts a new scope, returning from the function ends it. When a scope ends, its variables are converted to values ('return .@var;' returns a value, not a reference). "scope that ends when the script ends" that means this kind of variables will stop existing as soon the script reach an end; or close; statement. (Maybe not what you want since this variables seems to be like constants). Then you call getcharid for no reason... I mean, you are not saving the result to any variable or using it for nothing. You can take that out trust me. SECOND PART. if(getcharid(0)){ OnPCLoginEvent: addtimer 1000, strnpcinfo(3) + "::OnSurvival"; end; OnSurvival: setd ".@fome$", "80"; setd ".@sede$", "80"; setd ".@sono$", "80"; deltimer strnpcinfo(3) + "::OnSurvival"; addtimer 1000, strnpcinfo(3) + "::OnPenality1"; addtimer 1000, strnpcinfo(3) + "::OnPenality2"; end; OnPenality1: deltimer strnpcinfo(3) + "::OnPenality1"; if (.@fome > 0 && .@sede > 0){ .@fome = -1; .@sede = -1; addtimer 30000, strnpcinfo(3) + "::OnPenality1"; } else warp "sec_pri",50,76; end; OnPenality2: deltimer strnpcinfo(3) + "::OnPenality2"; if (.@sono > 0){ .@sono = -1; addtimer 30000, strnpcinfo(3) + "::OnPenality2"; } else warp "sec_pri",50,76; end; if (.@fome > 100 && .@sede > 100 && .@sono > 100 && .@dubarma > 100 && .@dubarmadura > 100){ setd ".@fome$", "100"; setd ".@sede$", "100"; setd ".@sono$", "100"; setd ".@dubarma$", "100"; setd ".@dubarmadura$", "100"; end; } } Ok... ok ok.. ok. Why that if?? It´s like if youy put something like... if(1) GO AHEAD. So that if.. you can take it out and do it without that. I´m not gonna talk about timers, I hate them. Then my favorite part. You declare text variables to store numbers... as text. Oh man, I hope you don´t wanna do some number comparisons later... wait.. you don´t because... oh... Yo you put some texts as "80" and then... put some timers to substract other variables not previously declared... Ok... ok, I tried to fix it a little, have it a look and try to understand why I did the changes. If I do all the work you won´t improve: prontera,153,173,5 script sobrevivencia 85,{ OnPCLoginEvent: addtimer 1000, strnpcinfo(3) + "::OnSurvival"; end; OnSurvival: set fome, 80; set sede, 80; set sono, 80; deltimer strnpcinfo(3) + "::OnSurvival"; addtimer 1000, strnpcinfo(3) + "::OnPenality1"; addtimer 1000, strnpcinfo(3) + "::OnPenality2"; end; OnPenality1: deltimer strnpcinfo(3) + "::OnPenality1"; if (fome > 0 && sede > 0){ fome = -1; sede = -1; addtimer 30000, strnpcinfo(3) + "::OnPenality1"; if (fome > 100){set fome, 100;} if (sede > 100){set sede, 100;} if (dubarma > 100){set dubarma, 100;} if (dubarmadura > 100){set dubarmadura, 100;} end; }else{ warp "sec_pri",50,76; end; } OnPenality2: deltimer strnpcinfo(3) + "::OnPenality2"; if (sono > 0){ sono = -1; addtimer 30000, strnpcinfo(3) + "::OnPenality2"; if (sono > 100){set sono, 100;} if (dubarma > 100){set dubarma, 100;} if (dubarmadura > 100){set dubarmadura, 100;} end; }else{ warp "sec_pri",50,76; end; } OnInit: $fome$ = "[Fome]"; $sede$ = "[Sede]"; $sono$ = "[Sono]"; $dubarma$ = "[DubArma]"; $dubarmadura$ = "[DubArmadura]"; } BUT, i didn´t test it so I´m not sure about this. I didn´t look all the script, just cleaned the biggest parts. Keep the work!
  22. Just as explanation... When running a script that have text with mes command, as soon as you use "close;" the script not only send the close button to the screen, it will also stop the script from executing. The error in first post I think it happens when you use "close" to end a script that haves no message box poped up in game. I didn´t read all the script (is too long) but I detected a case at the first lines where this can happen so let me explain: switch(select("There is hope, I'll take the challenge","No thanks")) { case 1: //RATHENA if ((checkquest(13184) == 0) || (checkquest(13184) == 1) || (checkquest(13184) == 2)) { //HERCULES //if ((questprogress(13184) == 1) || (questprogress(13184) == 2)) { mes "[Charleston]"; mes "I will do my best to finish, even if the possibility is a million to one, it is unlikely, even without him."; cutin "", 255; } else { mes "[Charleston]"; mes "Hi ... human robot. I do not care that you are rational and efficient, but today is a certain day."; next; mes "[Charleston]"; mes "Ironically, I never expected anyone 'rational' to come to challenge this being, your efforts will be necessary to see a real change on the planet."; next; mes "[Charleston]"; mes "I would love to help you, even without any responsibility. However, I will place my trust in you, even if the possibility is minimal."; next; mes "[Charleston]"; mes "Even when my heart stops, I know that my trust is deposited with you."; setquest 13184; cutin "", 255; } close; case 2: //RATHENA if ((checkquest(13184) == 1) || (checkquest(13184) == 0) || (checkquest(13184) == 2)) { //HERCULES //if ((questprogress(13184) == 1) || (questprogress(13184) == 2)) { close2; erasequest 13184; } cutin "", 255; close; } So what happens if you select "No thanks" and you come inside the if: if ((checkquest(13184) == 1) || (checkquest(13184) == 0) || (checkquest(13184) == 2)) { It will use a "close2" to close the window but keep executing further commands. Then erase a quest, ok it´s fine, and THEN!! it will remove a cutin and "CLOSE" again the window that doesn´t exist anymore. And there you will have the error. If there is no text box use end; instead of close; but in my opinion, you can get rid of that close2; as the close will do the job later. Maybe later in the script there are more situations as this one, but is too long to read!
  23. As all the others said, you are creating an array with this items: setarray $@pr_flags[0],0,1,2,3,4,5,11,12,13,31,33,34,37,43,47,mf_nostorage,mf_noguildstorage; // Lista de Mapflags. Under an OnInit label. So... This will be executed as soon the server starts or the scripts are reloaded without any player attached. The values mf_nostorage and mf_noguildstorage have the sintax of a character persistant variable but as no player is attached it cannot get those values. Those mapflags apparently are not default ones... So... as Emistry said, you make them a constant or if you can, replace them by their number.
  24. I just tried this code: explode(.@mapwarp$, "Hola y adios", " "); mes .@mapwarp$[0]; mes .@mapwarp$[1]; mes .@mapwarp$[2]; And it gives: So it works fine, you can delimitate using space. ¿Can you show your code?
  25. It´s possible doing some magic... Let me explain: You have this: *getinventorylist {<char_id>}; This command sets a bunch of arrays with a complete list of whatever the invoking character has in their inventory, including all the data needed to recreate these items perfectly if they are destroyed. Here's what you get: @inventorylist_id[] - array of item ids. @inventorylist_amount[] - their corresponding item amounts. @inventorylist_equip[] - on which position the item is equipped (see EQP_* constants) It will contain 0 if the item is not equipped. @inventorylist_refine[] - for how much it is refined. @inventorylist_identify[] - whether it is identified. @inventorylist_attribute[] - whether it is broken. @inventorylist_card1[] - These four arrays contain card data for the items. @inventorylist_card2[] These data slots are also used to store names @inventorylist_card3[] inscribed on the items, so you can explicitly check @inventorylist_card4[] if the character owns an item made by a specific craftsman. @inventorylist_expire[] - expire time (Unix time stamp). 0 means never expires. @inventorylist_bound[] - the bound type of the items (see BOUND_* constants) @inventorylist_count - the number of items in these lists. @inventorylist_option_id1[] - first array of random option IDs @inventorylist_option_value1[] - first array of random option values @inventorylist_option_parameter1[] - first array of random option parameters @inventorylist_option_id2[] - second array of random option IDs @inventorylist_option_value2[] - second array of random option values @inventorylist_option_parameter2[] - second array of random option parameters @inventorylist_option_id3[] - third array of random option IDs @inventorylist_option_value3[] - third array of random option values @inventorylist_option_parameter3[] - third array of random option parameters @inventorylist_option_id4[] - fourth array of random option IDs @inventorylist_option_value4[] - fourth array of random option values @inventorylist_option_parameter4[] - fourth array of random option parameters @inventorylist_option_id5[] - fifth array of random option IDs @inventorylist_option_value5[] - fifth array of random option values @inventorylist_option_parameter5[] - fifth array of random option parameters Using this information: @inventorylist_card1[] - These four arrays contain card data for the items. @inventorylist_card2[] These data slots are also used to store names @inventorylist_card3[] inscribed on the items, so you can explicitly check @inventorylist_card4[] if the character owns an item made by a specific Plus knowing the formula behind the name on an item: @charid = getcharid(0); @card3 = @charid & 65535; @card4 = @charid >> 16; You can do something like... @card3 = getcharid(0) & 65535; @card4 = getcharid(0) >> 16; getinventorylist getcharid(0); for( .@a = 0; .@a < @inventorylist_count; .@a++ ){ if(@inventorylist_id[.@a] == <ITEMIDAXE> && @inventorylist_card3[.@a] == @card3 && @inventorylist_card4[.@a] == @card4){set .@test,1;} } if(.@test == 1){mes "Yeah, you have your apple";}else{mes "Bring ur apple mtfkr!";} close; end; You will need to change the <ITEMIDAXE> to the item id you are searching tho... Hope it helps!
×
×
  • Create New...