Jump to content

caos51

Members
  • Posts

    25
  • Joined

  • Last visited

About caos51

  • Birthday November 11

Profile Information

  • Gender
    Male
  • Server
    TalesRO
  • Discord: Caos#2632

Contact Methods

Recent Profile Visitors

785 profile views

caos51's Achievements

  1. Send me your full script, probably the missing ";" is on the previous line.
  2. And... what is a credit and how are stored in your server? It´s a... variable how is named? It´s an easy script
  3. 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.
  4. What it does right now if you put more than 100 only does 100 anyways. If you want an error, change: if([email protected] > 100){set [email protected],100;} for this: if([email protected] > 100){goto Lnenough;}
  5. I don´t know if you copied it before my last edit, just in case copy it again jajajaja (fixed a ")" in delete item).
  6. Uhm... I´ll try yo explain. Now you have a configuration part: //Change to what requirements you want to use set [email protected][0],713,970,607; //Array with items IDs to use (only 1 of them). //set [email protected][0],1,3,1; //Uncomment if you want to use different quantities for each item, same order, array with quentities to use. set [email protected],100000; //Money required. set [email protected],607; //The obtained item on success. The first array [email protected][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 [email protected][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 [email protected][0],<ITEM ID 1>,<ITEM ID 2>,<ITEM ID 3>...; [email protected][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__ { [email protected] = getstrlen( [email protected]$ = getarg(0) ) -3; [email protected]_negative = charat( [email protected]$, 0 ) == "-"; while ( [email protected] > [email protected]_negative ) { [email protected]$ = insertchar( [email protected]$, ",", [email protected] ); [email protected] -= 3; } return [email protected]$; } //Change coordinates prontera,144,180,3 script Brewho 46,{ //Configuration, items and zenys: //Change to what requirements you want to use setarray([email protected][0],713,970,607); //Array with items IDs to use (only 1 of them). //setarray([email protected][0],1,3,1); //Uncomment if you want to use different quantities for each item, same order, array with quentities to use. set [email protected],100000; //Money required. set [email protected],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( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++ ){if([email protected][[email protected]]>0){mes ""+getitemname([email protected][[email protected]])+" x"[email protected][[email protected]]+"";}else{mes ""+getitemname([email protected][[email protected]])+"";}} mes "^000000"; mes "Also, a talent fee of "+int__([email protected])+" z!"; menu "I've got them master brewer!",-; next; mes "(How many tries?)"; mes "Max: 100"; input [email protected]; next; if([email protected] < 1){goto Lnenough;} if([email protected] > 100){set [email protected],100;} //Checking requirements for( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++ ){if([email protected][[email protected]]>0){if(countitem([email protected][[email protected]]) < ([email protected]*[email protected][[email protected]])){goto Lnenough;}}else{if(countitem([email protected][[email protected]]) < [email protected]){goto Lnenough;}}} if(Zeny < [email protected]){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( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++ ){if([email protected][[email protected]]>0){delitem [email protected][[email protected]],([email protected][[email protected]]*[email protected]);}else{delitem [email protected][[email protected]],[email protected];}} set Zeny,[email protected]; for( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ){ //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 [email protected],strcharinfo(0); //Change Item ID, Must match the potion to be made! set [email protected],[email protected]+1; //goto Lsuccess; } else { misceffect 306; set [email protected],[email protected]+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 "[email protected]+" time/s and failed "[email protected]+" time/s."; if(BrewExp < 10000){dispbottom "You've gained "[email protected]+" 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.
  7. 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__ { [email protected] = getstrlen( [email protected]$ = getarg(0) ) -3; [email protected]_negative = charat( [email protected]$, 0 ) == "-"; while ( [email protected] > [email protected]_negative ) { [email protected]$ = insertchar( [email protected]$, ",", [email protected] ); [email protected] -= 3; } return [email protected]$; } //Change coordinates prontera,144,180,3 script Brewho 46,{ //Configuration, items and zenys: //Change to what requirements you want to use set [email protected][0],713,970,607; //Array with items IDs to use (only 1 of them). //set [email protected][0],1,3,1; //Uncomment if you want to use different quantities for each item, same order, array with quentities to use. set [email protected],100000; //Money required. set [email protected],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( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++ ){if([email protected][[email protected]]>0){mes ""+getitemname([email protected][[email protected]])+" x"[email protected][[email protected]]+"";}else{mes ""+getitemname([email protected][[email protected]])+"";}} mes "^000000"; mes "Also, a talent fee of "+int__([email protected])+" z!"; menu "I've got them master brewer!",-; next; input [email protected]; next; if([email protected] < 1){goto Lnenough;} //Checking requirements for( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++ ){if([email protected][[email protected]]>0){if(countitem([email protected][[email protected]]) < ([email protected]*[email protected][[email protected]])){goto Lnenough;}}else{if(countitem([email protected][[email protected]]) < [email protected]){goto Lnenough;}}} if(Zeny < [email protected]){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( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++ ){if([email protected][[email protected]]>0){delitem [email protected][[email protected]],([email protected][[email protected]]*[email protected]));}else{delitem [email protected][[email protected]],[email protected];}} set Zeny,[email protected]; for( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ){ //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 [email protected],strcharinfo(0); //Change Item ID, Must match the potion to be made! set [email protected],[email protected]+1; //goto Lsuccess; } else { misceffect 306; set [email protected],[email protected]+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 "[email protected]+" time/s and failed "[email protected]+" time/s."; if(BrewExp < 10000){dispbottom "You've gained "[email protected]+" 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!
  8. 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!
  9. Maybe just using *atcommand to let the user use @slaveclone through a script?
  10. 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.
  11. 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__ { [email protected] = getstrlen( [email protected]$ = getarg(0) ) -3; [email protected]_negative = charat( [email protected]$, 0 ) == "-"; while ( [email protected] > [email protected]_negative ) { [email protected]$ = insertchar( [email protected]$, ",", [email protected] ); [email protected] -= 3; } return [email protected]$; } //Change coordinates prontera,144,180,3 script Brewho 46,{ //Configuration, items and zenys: //Change to what requirements you want to use set [email protected][0],713,970,607; //Array with items IDs to use (only 1 of them). //set [email protected][0],1,3,1; //Uncomment if you want to use different quantities for each item, same order, array with quentities to use. set [email protected],100000; //Money required. set [email protected],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( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++ ){if([email protected][[email protected]]>0){mes ""+getitemname([email protected][[email protected]])+" x"[email protected][[email protected]]+"";}else{mes ""+getitemname([email protected][[email protected]])+"";}} mes "^000000"; mes "Also, a talent fee of "+int__([email protected])+" z!"; menu "I've got them master brewer!",-; next; input [email protected]; next; //Checking requirements for( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++ ){if([email protected][[email protected]]>0){if(countitem([email protected][[email protected]]) < ([email protected]*[email protected][[email protected]])){goto Lnenough;}}else{if(countitem([email protected][[email protected]]) < [email protected]){goto Lnenough;}}} if(Zeny < [email protected]) 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( [email protected] = 0; [email protected] < getarraysize([email protected]); [email protected]++ ){if([email protected][[email protected]]>0){delitem [email protected][[email protected]],([email protected][[email protected]]*[email protected]));}else{delitem [email protected][[email protected]],[email protected];}} set Zeny,[email protected]; //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( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ){ if(@brewchance == 1) { misceffect 305; set BrewExp,BrewExp+1; getnameditem [email protected],strcharinfo(0); //Change Item ID, Must match the potion to be made! set [email protected],[email protected]+1; //goto Lsuccess; } else { misceffect 306; set [email protected],[email protected]+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 "[email protected]+" time/s and failed "[email protected]+" time/s."; if(BrewExp < 10000){dispbottom "You've gained "[email protected]+" 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
  12. I don´t know if you can specify what is exactly not workin, but in any case... I see some strange things like: set [email protected][[email protected][0]], strcharinfo(0); if limits are: setarray [email protected][0], $racelk, $racepally, $racehw, $raceprof, $racesniper, $raceclown, $racegypsy, $racehp, $racechamp, $racews, $racecreo, $racesinx, $racestalker, $racesl, $racesg, $raceninja, $racegs, $racesn; and [email protected] is not an array, that makes no sense for me... it should be just [email protected][[email protected]] 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.
  13. 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.
  14. 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.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.