Jump to content

ItsFree

Members
  • Posts

    121
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by ItsFree

  1. 501,Red_Potion,Red Potion,0,50,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ if(countitem(512)>0) { callfunc "CustomBox"; }},{},{} function script CustomBox { setarray .BoxItems[0],501,502,503; set .Random, getarraysize( .BoxItems ); delitem 512,1; getitem .BoxItems[ rand( .Random ) ], 1; announce "["+strcharinfo(0)+"] has just obtained a ["+getitemname(.BoxItems[ .Random ])+"] from a Custom Box.",0; end; } @Cyro Nice... just a question is there no a way to set percent by items like the original "old blue box" ¿? i mean 1% to 501, 10% to 502, 50% to 503, etc. Edited: what did i do wrong ? i tried with "old red box" changing it... but no error on console and only unidentified ribbon gives me :/ also i can open it without consuming the item 512 :c function script SpecialCustomBox { setarray .BoxItems[0],7228,7229,7230,7231,7232,7333; set .Random, getarraysize( .BoxItems ); delitem 512,1; getitem .BoxItems[ rand( .Random ) ], 1; announce "["+strcharinfo(0)+"] has just obtained a ["+getitemname(.BoxItems[ .Random ])+"] from a Special Custom Box.",0; end; }
  2. Thx! i'll try it on a few hours (alredy on bed...) but yeah i guess i understand ^^ well first i gonna check it xD just on... getitem <reward>,<amount> // Reward ID on "<reward>" there i can put... "getrandgroupitem(IG_CustomBox),1;" right ¿? or....
  3. Hi, Rathena community is there a way to "create" a custom box,. that only can be open if you have X item, and after opening the custom box the X item is consumed.... i know how to create a custom box, but is there a way to do that? is like.... i need a "key" to open it and after open the box the "key" is consumed. If need more info... i can try explain better ^^
  4. @Stolao oh so i even understand wrong is about mastery level nice, not tested yet Ok now i got it or at least most of them, but still have some questions, the max mastery level can be set here right .MaxMastery = 99; // Sets the max Weapon Mastery Level is there a limit about max lvl ¿? i mean if i want max lvl 1000 or something also the max bonus where can i set it¿? also what this means .wLvBonus = 150; // Amount of extra Weapon Exp from higher level weapons, // Bonus exp = WLv * WLv * .wLvBonus // Default 150 and the exp tables for each level where can i see them ¿? i found this but i didnt understand .expcurve = 20000; // Exp curve for weapon mastery // Lv * Lv * .expcurve + .FirstLevel + Lv // Default 5000 // Exp Formula for(.@i = 0; .@i < .MaxMastery; .@i++) .NeededExp[.@i] = (.@i * .@i * .expcurve) + (.@i * 100) + .FirstLevel; the exp is gain each time you kill every mob/player right ¿? without taking care which kind of mob not tested yed... but had question so im asking them ^^
  5. testing on some minutes looking for something like this for a time long xD
  6. Hi, rAthena Community, i need some help about this script (not tested yet but i guess is working) what i want... is a bit help how to edit the bonuses, i liked whole the script but i wanna change some bonuses because counting em' with a base lv 255 (like the server im using) the bonuses would be get broken.... also i wanna delete some of em and add news as i can understand ... //===== EinherjarRO Scripts ================================== //= WeaponMasteries //===== By: ================================================== //= Stolao //===== Current Version: ===================================== //= 1.36 //===== Compatible With: ===================================== //= rAthena SVN //===== Description: ========================================= //= As you train using a particulat weapon type you gain //= passive bonuses depending on how much you have trained in //= that type. There are five types Onslaught, Swiftness, //= Safeguard, Ranged and Mystical //===== Comments: ============================================ //= Masteries can go up to level 999 with curve of 2100 //===== Additional Comments: ================================= //= Visit Git For Older Versions //= 1.25 Added a Small boost to secondary stat based off prime stat //= 1.26 Added a Check for Item in Hand + Conf //= 1.27 Fixed mssing "" //= 1.28 Fixed missing ')' //= 1.29 Added a missing conf setting //= 1.2A Fixed missing descriptions //= 1.2B Increased .expcurve from 2500 -> 5000 due to Jobrate //= 1.2C Increased .wLvBonus from 1 -> 150 due to Jobrate //= 1.2D Replace 10 with .FirstLevel for custmoizability //= 1.2E Increase .FirstLevel from 10 -> 2000 due to Jobrate //= 1.2F Moved Level 0 Effects to top for consistant reading //= 1.30 Fixed a bug with @wlvl //= 1.31 Fixed bug where you would recive bonus from no gear //= 1.32 Tabulation //= 1.33 Made sword Onslaught //= 1.34 Made Any Shield Combo Safeguard //= 1.35 Made Exp Table a Constant (Dynamic from settings) //= 1.36 Fixed typo bug in Leveing up //===== Contact Ifo: ========================================= //= [Stolao] //= Email: [email protected] //============================================================ // // Str - Onslaught: 2HSword,1HAxe,2HAxe,1HMace,2HMace(unused),Knuckle // Agi - Swiftness: Dagger,Fuuma Shuriken,Katar // Vit - Safegaurd: Unarmmed,1HSpear,2HSpear,Specialty // Dex - Ranged: Bow,Instrument,Whip,Revolver,Rifle,Gatling Gun,Shotgun,Grenade Launcher // Int - Mystical: Rod,Book,2HStaff,Scythe function script Onslaught_M { bonus bStr,1+getarg(0,0)/32; bonus bAtkrate,1 + getarg(0,0) / 7 + ((1 + getarg(0,0) / 7) *readparam(bStr) / 100); if(getarg(0,0) >= 1) bonus bCritical,1+getarg(0,0)/20; if(getarg(0,0) >= 2) bonus bAtk,1+getarg(0,0)/4; if(getarg(0,0) >= 4) bonus bAtk2,1+getarg(0,0)/4; if(getarg(0,0) >= 8) bonus bPerfectHitAddRate,1+getarg(0,0)/21; if(getarg(0,0) >= 16) bonus bBaseAtk,getarg(0,0)/4+1; if(getarg(0,0) >= 32) bonus bCritAtkRate,getarg(0,0)/4+1; if(getarg(0,0) >= 64) bonus bAspdRate,getarg(0,0)/22 + 1; if(getarg(0,0) >= 128) bonus bSplashAddRange,1; return; } function script Swiftness_M { bonus bAgi,1+getarg(0,0)/32; bonus bAspdRate,1+getarg(0,0)/7+((1+getarg(0,0)/7)*readparam(bAgi)/100); if(getarg(0,0) >= 1) bonus bSpeedAddRate,1+getarg(0,0)/9; if(getarg(0,0) >= 2) bonus bFlee,getarg(0,0)/3; if(getarg(0,0) >= 4) bonus bDoubleAddRate,1+getarg(0,0)/9; if(getarg(0,0) >= 8) bonus bFlee2,1+getarg(0,0)/33; if(getarg(0,0) >= 16) bonus bPerfectHitAddRate,1+getarg(0,0)/11; if(getarg(0,0) >= 32) bonus bCritAtkRate,getarg(0,0)/9-1; if(getarg(0,0) >= 64) bonus bCritical,1+getarg(0,0)/10; if(getarg(0,0) >= 128) bonus2 bHPDrainRate,1+getarg(0,0),1+getarg(0,0)/24; return; } function script Safegaurd_M { bonus bVit,1+getarg(0,0)/32; bonus bMaxHP,getarg(0,0)*5+5+((getarg(0,0)*5+5)*readparam(bVit)/100); if(getarg(0,0) >= 1) bonus bHPrecovRate,1+getarg(0,0)/2; if(getarg(0,0) >= 2) bonus bDef,1+getarg(0,0)/20; if(getarg(0,0) >= 4) bonus bMdef,1+getarg(0,0)/24; if(getarg(0,0) >= 8) bonus bMaxHPrate,1+getarg(0,0)/11; if(getarg(0,0) >= 16) bonus bNearAtkDef,getarg(0,0)/20+1; if(getarg(0,0) >= 32) bonus bLongAtkDef,getarg(0,0)/21+1; if(getarg(0,0) >= 64) bonus bMagicAtkDef,getarg(0,0)/22+1; if(getarg(0,0) >= 128) bonus bCriticalDef,getarg(0,0)/23+1; return; } function script Ranged_M { bonus bDex,1+getarg(0,0)/32; bonus bAtkrate,1+getarg(0,0)/7+((1+getarg(0,0)/7)*readparam(bDex)/100); if(getarg(0,0) >= 1) bonus bBaseAtk,getarg(0,0)/3+2; if(getarg(0,0) >= 2) bonus bCritical,1+getarg(0,0)/21; if(getarg(0,0) >= 4) bonus bFlee,1+getarg(0,0)/11; if(getarg(0,0) >= 8) bonus bAspd,1+getarg(0,0)/11; if(getarg(0,0) >= 16) bonus bHit,1+getarg(0,0)/5; if(getarg(0,0) >= 32) bonus bLongAtkRate,getarg(0,0)/9-1; if(getarg(0,0) >= 64) bonus bCritAtkRate,4+getarg(0,0)/9; if(getarg(0,0) >= 128) bonus bAtkRange,1+getarg(0,0)/99; return; } function script Mystical_M { bonus bInt,1+getarg(0,0)/32; bonus bMatk,1+getarg(0,0)+((1+getarg(0,0))*readparam(bInt)/100); if(getarg(0,0) >= 1) bonus bSPrecovRate,1+getarg(0,0)/2; if(getarg(0,0) >= 2) bonus bMaxSP,getarg(0,0)*2+2; if(getarg(0,0) >= 4) bonus bCastrate,-1-getarg(0,0)/20; if(getarg(0,0) >= 8) bonus bUseSPrate,-1-getarg(0,0)/21; if(getarg(0,0) >= 16) bonus bDelayrate,-1-getarg(0,0)/22; if(getarg(0,0) >= 32) bonus bHealPower,1+getarg(0,0)/2; if(getarg(0,0) >= 64) bonus bMAtkrate,1+getarg(0,0)/7; if(getarg(0,0) >= 128) bonus bNoCastCancel,1; return; } prontera,5,5,5 script PCSTATCALC 111,{ end; OnWeaponInfo: .@M$ = .@atcmd_parameters$[0]; if((.@M$ == "")){ if(getiteminfo(getequipid(EQI_HAND_R),11) == 2 && getiteminfo(getequipid(EQI_HAND_L),2) == 4) .@i = 0; else .@i = getiteminfo(getequipid(EQI_HAND_R),11); switch(.@i){ case 3: case 6: case 7: case 8: case 9: case 12: case 2: .@M$ = "Onslaught"; Break; case 1: case 16: case 22: .@M$ = "Swiftness"; Break; case 4: case 5: default: .@M$ = "Safegaurd"; Break; case 11: case 13: case 14: case 17: case 18: case 19: case 20: case 21: .@M$ = "Ranged"; Break; case 10: case 15: case 23: case 24: .@M$ = "Mystical"; Break; } } if(.@M$ == "Onslaught" || .@M$ == "onslaught" || .@M$ == "OnSlaught") .@i = 1; if(.@M$ == "Swiftness" || .@M$ == "swiftness") .@i = 2; if(.@M$ == "Safegaurd" || .@M$ == "SafeGaurd" || .@M$ == "safegaurd") .@i = 3; if(.@M$ == "Ranged" || .@M$ == "ranged" ) .@i = 4; if(.@M$ == "Mystical" || .@M$ == "mystical" ) .@i = 5; .@X = atoi(.@atcmd_parameters$[1]); if(!.@X) .@X = getd(""+.@M$+"Master"); switch(.@i){ case 1: dispbottom "Onslaught Lv: "+.@X+" "+OnslaughtExp+" / "+.NeededExp[.@X]+"xp"; dispbottom "Str +"+(1+.@X/32)+""; dispbottom "Atk +"+(1+.@X/9)+"%"; if(.@X >= 1)dispbottom "Critical Chance +"+(1+.@X/20)+""; if(.@X >= 2)dispbottom "Atk +"+(1+.@X/9)+""; if(.@X >= 4)dispbottom "Weapon Atk +"+(1+.@X/11)+""; if(.@X >= 8)dispbottom "Perfect Hit +"+(1+.@X/21)+""; if(.@X >= 16)dispbottom "Base Atk +"+(.@X/4+1)+""; if(.@X >= 32)dispbottom "Crit Damage +"+(.@X/8+3)+"%"; if(.@X >= 64)dispbottom "Aspd +"+.@X/16+"%"; if(.@X >= 128)dispbottom "Splash attack radius +1"; break; case 2: dispbottom "Swiftness Lv: "+.@X+" "+SwiftnessExp+" / "+.NeededExp[.@X]+"xp"; dispbottom "Agi +"+(1+.@X/32)+""; dispbottom "Aspd +"+(1+.@X/9)+"%"; if(.@X >= 1)dispbottom "Moving speed +"+(1+.@X/9)+"%"; if(.@X >= 2)dispbottom "Flee +"+(.@X/2)+""; if(.@X >= 4)dispbottom "Double Attack Chance +"+(1+.@X/9)+"%"; if(.@X >= 8)dispbottom "Perfect Dodge +"+(1+.@X/33)+""; if(.@X >= 16)dispbottom "On-target impact chance +"+(1+.@X/11)+"%"; if(.@X >= 32)dispbottom "Crit Damage +"+(.@X/9-1)+"%"; if(.@X >= 64)dispbottom "Critical Chance +"+(1+.@X/10)+""; if(.@X >= 128)dispbottom ""+(1+SwiftnessMaster)/10+"."+((1+SwiftnessMaster)%10)+"% chance of healing for "+(.@X/24+1)+"% of damage dealt with each normal attack"; break; case 3: dispbottom "Safegaurd Lv: "+.@X+" "+SafegaurdExp+" / "+.NeededExp[.@X]+"xp"; dispbottom "Vit +"+(1+.@X/32)+""; dispbottom "Max HP +"+(.@X*5+5)+""; if(.@X >= 1)dispbottom "Natural HP recovery ratio +"+(1+.@X/2)+"%"; if(.@X >= 2)dispbottom "Def +"+(1+.@X/20)+""; if(.@X >= 4)dispbottom "Mdef +"+(1+.@X/24)+""; if(.@X >= 8)dispbottom "Max HP +"+(1+.@X/9)+"%"; if(.@X >= 16)dispbottom "Adds "+(.@X/20+1)+" damage reduction against Critical Hits"; if(.@X >= 32)dispbottom "Adds "+(.@X/21+1)+" damage reduction against melee physical attacks"; if(.@X >= 64)dispbottom "Adds "+(.@X/22+1)+" damage reduction against ranged physical"; if(.@X >= 128)dispbottom "Adds "+(.@X/23+1)+" damage reduction against magical attacks"; break; case 4: dispbottom "Ranged Lv: "+.@X+" "+RangedExp+" / "+.NeededExp[.@X]+"xp"; dispbottom "Dex +"+(1+.@X/32)+""; dispbottom "Atk +"+(1+.@X/9)+"%"; if(.@X >= 1)dispbottom "Moving speed +"+(1+.@X/20)+"%"; if(.@X >= 2)dispbottom "Critical +"+(1+.@X/21)+""; if(.@X >= 4)dispbottom "Flee +"+(1+.@X/2)+""; if(.@X >= 8)dispbottom "Aspd +"+(.@X/11)+""; if(.@X >= 16)dispbottom "Hit +"+(.@X/9)+""; if(.@X >= 32)dispbottom "Increases damage of ranged attacks by "+(.@X/11)+"%"; if(.@X >= 64)dispbottom "Crit Damage +"+(4+.@X/9)+"%"; if(.@X >= 128)dispbottom "Atk Range +"+(1+.@X/99)+""; break; case 5: dispbottom "Mystical Lv: "+.@X+" "+MysticalExp+" / "+.NeededExp[.@X]+"xp"; dispbottom "Int +"+(1+.@X/32)+""; dispbottom "Matk +"+(1+.@X/9)+"%"; if(.@X >= 1)dispbottom "Natural SP recovery ratio +"+(.@X/2+1)+"%"; if(.@X >= 2)dispbottom "Max SP +"+(2+.@X*2)+""; if(.@X >= 4)dispbottom "Skill casting time "+(-1-.@X/20)+"%"; if(.@X >= 8)dispbottom "SP consumption "+(-1-.@X/21)+"%"; if(.@X >= 16)dispbottom "Decreases skill delay by "+(1+.@X/22)+"%"; if(.@X >= 32)dispbottom "Increase heal amount of all heal skills by "+(1+.@X/2)+"%"; if(.@X >= 64)dispbottom "Weapon magical attack power +"+(.@X+1)+""; if(.@X >= 128)dispbottom "Prevents casting from being interrupted when hit"; break; default: dispbottom "@wi <Type> <Level>"; dispbottom "Type: Onslaught, Swiftness, Safegaurd, Ranged, Mystical"; break; } end; OnWeaponLevel: .@M$ = .@atcmd_parameters$[0]; .@X = atoi(.@atcmd_parameters$[1]); if((.@M$ != "Onslaught" && .@M$ != "Swiftness" && .@M$ != "Safegaurd" && .@M$ != "Ranged" && .@M$ != "Mystical" && .@M$ != "All")||!.@X){ dispbottom "@wlvl <type> <lvl>"; dispbottom "Onslaught, Swiftness, Safegaurd, Ranged, Mystical, All"; end; } if(.MaxMastery >= .@X){ if(.@M$ == "All"){ setarray .@X$[0],"Onslaught","Swiftness","Safegaurd","Ranged","Mystical"; .@i = 0; while(.@i < 5){ setd ""+.@X$[.@i]+"Master",.@X; setd ""+.@X$[.@i]+"Exp",0; dispbottom ""+.@X$[.@i]+" Mastery has advanced to Lv "+.@X+"!"; .@i++; } } else { setd ""+.@M$+"Master",.@X; setd ""+.@M$+"Exp",0; dispbottom ""+.@M$+" Mastery has advanced to Lv "+.@X+"!"; } } else dispbottom "Sorry. Your "+.@M$+" Mastery has reached its limit!"; end; OnPCStatCalcEvent: if(.Weapon){ if(getequipid(EQI_HAND_R) > 500 || (getequipid(EQI_HAND_R) < 500 && .RightFist)){ if(getiteminfo(getequipid(EQI_HAND_R),11) == 2 && getiteminfo(getequipid(EQI_HAND_L),2) == 4) .@i = 0; else .@i = getiteminfo(getequipid(EQI_HAND_R),11); switch(.@i){ case 3: case 6: case 7: case 8: case 9: case 12: case 2: Onslaught_M(OnslaughtMaster); Break; case 1: case 16: case 22: Swiftness_M(SwiftnessMaster); Break; case 4: case 5: default: Safegaurd_M(SafegaurdMaster); Break; case 11: case 13: case 14: case 17: case 18: case 19: case 20: case 21: Ranged_M(RangedMaster); Break; case 10: case 15: case 23: case 24: Mystical_M(MysticalMaster); Break; } } if((getequipid(EQI_HAND_L) > 500 && getiteminfo(getequipid(EQI_HAND_R),5) != 34 && .Left) || (getequipid(EQI_HAND_L) < 500 && .LeftFist)){ if(getiteminfo(getequipid(EQI_HAND_L),2) == 4) .@i = 0; else .@i = getiteminfo(getequipid(EQI_HAND_L),11); switch(.@i){ case 3: case 6: case 7: case 8: case 9: case 12: case 2: Onslaught_M(OnslaughtMaster / 2); Break; case 1: case 16: case 22: Swiftness_M(SwiftnessMaster / 2); Break; case 4: case 5: default: Safegaurd_M(SafegaurdMaster / 2); Break; case 11: case 13: case 14: case 17: case 18: case 19: case 20: case 21: Ranged_M(RangedMaster / 2); Break; case 10: case 15: case 23: case 24: Mystical_M(MysticalMaster / 2); Break; } } } end; OnNPCKillEvent: if(.Weapon){ .@M$ = ""; if(getequipid(EQI_HAND_R) > 500 || (getequipid(EQI_HAND_R) < 500 && .RightFist)){ if(getiteminfo(getequipid(EQI_HAND_R),11) == 2 && getiteminfo(getequipid(EQI_HAND_L),2) == 4) .@i = 0; else .@i = getiteminfo(getequipid(EQI_HAND_R),11); switch(.@i){ case 3: case 6: case 7: case 8: case 9: case 12: case 2: .@M$ = "Onslaught"; Break; case 1: case 16: case 22: .@M$ = "Swiftness"; Break; case 4: case 5: default: .@M$ = "Safegaurd"; Break; case 11: case 13: case 14: case 17: case 18: case 19: case 20: case 21: .@M$ = "Ranged"; Break; case 10: case 15: case 23: case 24: .@M$ = "Mystical"; Break; } .@exp = strmobinfo(3,killedrid); .@wLv = getiteminfo(getequipid(EQI_HAND_R),13); .@master = getd(""+ .@M$ + "Master"); if(.MaxMastery > .@master){ Setd ""+.@M$+"Exp",getd(""+.@M$+"Exp") + .@exp * (.Rates * (getstatus(SC_JEXPBOOST,3)?3:2) / 2) + .@wLv * .@wLv * .wLvBonus; if(getd(""+.@M$+"Exp") > .NeededExp[.@master]){ setd ""+.@M$+"Master",.@master + 1; announce ""+.@M$+" Mastery has advanced to Lv "+(.@master + 1)+"!",bc_blue|bc_self; Setd ""+.@M$+"Exp",0; } } } if((getequipid(EQI_HAND_L) > 500 && getiteminfo(getequipid(EQI_HAND_R),5) != 34 && .Left) || (getequipid(EQI_HAND_L) < 500 && .LeftFist)){ .@M$ = ""; if(getiteminfo(getequipid(EQI_HAND_L),2) == 4) .@i = 0; else .@i = getiteminfo(getequipid(EQI_HAND_L),11); switch(.@i){ case 3: case 6: case 7: case 8: case 9: case 12: case 2: .@M$ = "Onslaught"; Break; case 1: case 16: case 22: .@M$ = "Swiftness"; Break; case 4: case 5: default: .@M$ = "Safegaurd"; Break; case 11: case 13: case 14: case 17: case 18: case 19: case 20: case 21: .@M$ = "Ranged"; Break; case 10: case 15: case 23: case 24: .@M$ = "Mystical"; Break; } .@wLv = getiteminfo(getequipid(EQI_HAND_L),13); .@master = getd(""+ .@M$ + "Master"); if(.MaxMastery > .@master){ Setd ""+.@M$+"Exp",getd(""+.@M$+"Exp") + .@exp * (.Rates * (getstatus(SC_JEXPBOOST,3)?3:2) / 4) + .@wLv * .@wLv * .wLvBonus; if(getd(""+.@M$+"Exp") > .NeededExp[.@master]){ setd ""+.@M$+"Master",.@master + 1; announce ""+.@M$+" Mastery has advanced to Lv "+(.@master + 1)+"!",bc_blue|bc_self; Setd ""+.@M$+"Exp",0; } } } } end; OnInit: bindatcmd("wi" ,"PCSTATCALC::OnWeaponInfo",0,99); bindatcmd("weaponinfo" ,"PCSTATCALC::OnWeaponInfo",0,99); bindatcmd("wlvlup" ,"PCSTATCALC::OnWeaponLevel",60,99); bindatcmd("wlvl" ,"PCSTATCALC::OnWeaponLevel",60,99); .Weapon = 1; // Toggle Exp Groth On/Off // 1 = On // 0 = Off .Left = 1; // Toggle Left Handed Mastery, left hand recives ~1/2 exp and stats // 1 = On // 0 = Off .RightFist = 0; // Toggle Right fist recive Safegaurd Mastery effect // 1 = On // 0 = Off .LeftFist = 0; // Toggle Left fist recive Safegaurd Mastery effect // 1 = On // 0 = Off .FirstLevel = 20000; // Exp cost to get from level 0 -> 1 .expcurve = 20000; // Exp curve for weapon mastery // Lv * Lv * .expcurve + .FirstLevel + Lv // Default 5000 .MaxMastery = 99; // Sets the max Weapon Mastery Level // Default 128 .wLvBonus = 150; // Amount of extra Weapon Exp from higher level weapons, // Bonus exp = WLv * WLv * .wLvBonus // Default 150 // Exp Formula for(.@i = 0; .@i < .MaxMastery; .@i++) .NeededExp[.@i] = (.@i * .@i * .expcurve) + (.@i * 100) + .FirstLevel; // Dont Touch .Rates = getbattleflag("job_exp_rate"); } https://github.com/Stolao/Npc_Release/blob/master/Weapon_Mastery/WeaponMastery.txt this is for lv 0 = bonus bAtkrate,1 + getarg(0,0) / 7 + ((1 + getarg(0,0) / 7) *readparam(bStr) / 100); this for lv 1 if(getarg(0,0) >= 1) bonus bCritical,1+getarg(0,0)/20; this for lv 2 if(getarg(0,0) >= 2) bonus bAtk,1+getarg(0,0)/4; then 4... 8...16...etc ok i guess that i can understand also can understand the basic scripts "bonus bAtk..." but im kinda slow about the.... "1+getarg(0,0)/4" as i read here... https://github.com/Stolao/Npc_Release/blob/master/Weapon_Mastery/WeaponMastery_Details.txt here explain me all bonuses but what i want... is how edit, for example... the first is.... | Level | New Bonus | Bonus Rate | Max Bonus | | 0 | Str | 1+Lv/32 | 4 | but if i want something like.... |0 | Str |3+BaseStr/15 | 15 | or something like... |0 |Str |15-BaseStr/25| 13 | thats what i want... someone can explain me how do that ¿? i know that is just knowing basic scripts but.... what i learn i just learn it watching even i didnt study something like "programmer" or something like that well... thx! if someone help ^^ PD: Nice script Stolao <3 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Edit: also i wanted something for example... "Base Level x (random between 2~5) / (random 23~43)" ... well thx again ^^
  7. As the title say, someone there have a NPC that can enchant all equipment ¿? i've some examples what im looking for... basic is.... the npc let me pick which equipment (shoes, garment, armor, headgear, etc...) also let me choose which slot... each slot have a percent to fail/success if fail i can "edit" if happen nothing or if break..., also i can choose which "cards" or "card-items" for each equip location... also let me choose how much zeny or item_id for cost/try searching on the forum i found some similars, but is not working like i want. This only let me put 1 item and no more... if fix i would be glad.... This is perfect but only the first classes... and my server also use grunslinger and other classes... And this works well but only work with armor and only 4th slot :/ // --- prontera,180,180,8 script Sam 549,{ set .@nombre$, "[ ^FF0000Hidden Slot Enchant^000000 ]"; mes .@nombre$; mes "Hi i can enchant your armor but my service have a cost of ^FF0000" + .zeny + " z^000000."; next; if (select("Continue:More Information;") == 2) { mes .@nombre$; mes "I can enchant the 4th slot of the armor with a stat."; next; mes .@nombre$; mes "we can enchant armors without slot, with slot or."; mes "^FF0000Armors without slot i can enchant: ^000000"; for (set .@c, 0; .@c < getarraysize(.ids1); set .@c, .@c + 1) mes "- " + getitemname(.ids1[.@c]) + " [0]"; next; mes .@nombre$; mes "^FF0000Armors with slot i can enchant: ^000000"; for (set .@c, 0; .@c < getarraysize(.ids2); set .@c, .@c + 1) mes "- " + getitemname(.ids2[.@c]) + " [1]"; next; mes .@nombre$; mes "^FF0000High quality armor i can enchant: ^000000"; for (set .@c, 0; .@c < getarraysize(.ids3); set .@c, .@c + 1) mes "- " + getitemname(.ids3[.@c]) + " [1]"; next; } // End if mes .@nombre$; if (zeny < .zeny) { mes "Sorry but you dont have enough zeny."; close; } // End if mes "Choose the kind of armor you want to enchant. ^FF0000There's a 10% to break the item.^000000."; next; switch (select("Armor without Slot:Armor with Slot:High Quality Armor")) { case 1: set .@j, 1; break; case 2: set .@j, 2; break; case 3: set .@j, 3; break; } for (set .@c, 0; .@c < getarraysize(getd(".ids" + .@j)); set .@c, .@c + 1) if (isequipped(getd(".ids" + .@j + "[" + .@c +"]")) == 1) set .@s, .@c; mes .@nombre$; if (!.@s) { if (atoi(getequipname(EQI_ARMOR)) == -1) mes "You dont have any armor equipped, so nothing to enchant.."; else mes "You've Equipped ^FF0000" + getequipname(EQI_ARMOR) + " Armor^000000, and doesn't one of the list before..."; close; } mes "Oh you have a ^FF0000[" + getitemname(getd(".ids" + .@j + "[" + .@s +"]")) + "]^000000 equip."; next; mes .@nombre$; mes "Here we go..."; mes "¡Good Luck!"; next; set zeny, zeny - .zeny; set .@itemid, getequipid(EQI_ARMOR); delitem .@itemid,1; set .@rand, rand(1000); if (.@rand >= 0 && .@rand < 100) { // Break 10% mes "[Hidden Slot Enchant]"; mes "Whoops i fail... sorry..."; close; } else if (.@rand >= 100 && .@rand < 300) // +1 20% setarray .@level[0],4700,4710,4720,4730,4740,4750; else if (.@rand >= 300 && .@rand < 450) // +2 15% setarray .@level[0],4701,4711,4721,4731,4741,4751; else if (.@rand >= 450 && .@rand < 600) // +3 15% setarray .@level[0],4702,4712,4722,4732,4742,4752; else if (.@rand >= 600 && .@rand < 700) // +4 10% setarray .@level[0],4703,4713,4723,4733,4743,4753; else if (.@rand >= 700 && .@rand < 800) // +5 10% setarray .@level[0],4704,4714,4724,4734,4744,4754; else if (.@rand >= 800 && .@rand < 890) // +6 9% setarray .@level[0],4705,4715,4725,4735,4745,4755; else if (.@rand >= 890 && .@rand < 940) // +7 5% setarray .@level[0],4706,4716,4726,4736,4746,4756; else if (.@rand >= 940 && .@rand < 965) // +8 2,5% setarray .@level[0],4707,4717,4727,4737,4747,4757; else if (.@rand >= 965 && .@rand < 990) // +9 2,5% setarray .@level[0],4708,4718,4728,4738,4748,4758; else if (.@rand >= 990) // +10 1% setarray .@level[0],4709,4719,4728,4739,4749,4759; set .@runa, .@level[rand(getarraysize(.@level))]; getitem2 .@itemid, 1, 1, 0, 0, 0, 0, 0, .@runa; mes "[Hidden Slot Enchant]"; mes "Great! here's your armor."; close; OnInit: set .zeny, 80000000; setarray .ids1[0],2307, // Mantle 2309, // Coat 2314, // Chain Mail 2316, // Plate Armor 2321, // Silk Robe 2325, // Saint Robe 2327, // Holy Robe 2330, // Tights 2332, // Silver Robe 2334, // Magic Coat 2335, // Thief Clothes 2341, // Legion Full Plate 2344, // Pierce Armor of Volcano 2348, // Saphien's armor of ocean 2346, // Aebeecee's Raging Typhoon Armor 2350, // Claytos Cracking Earth Armor 2395, // Glorious Suit type 2 2396, // Glorious Suit type 3 2394, // Glorious Suit type 1 2337, // Ninja Suit 2386; // Chameleon Armor setarray .ids2[0],2311, // Mink Coat[1] 2318, // Lord Clothes[1] 2319, // Glitering Jacket[1] 2320, // Formal Suit[1] 2308, // Mantle[1] 2310, // Coat [1] 2315, // Chain Mail[1] 2317, // Plate Armor[1] 2322, // Silk Robe[1] 2323, // Scapulare[1] 2326, // Saint Robe[1] 2331, // Tights[1] 2333, // Silver Robe[1] 2336, // Thief Clothes[1] 2342, // Legion's Full Plate[1] 2345, // Pierce Armor of Volcano[1] 2347, // Saphien's Armor of ocean[1] 2349, // Aebecee's Raging Typhoon Armor[1] 2351; // Claytos Cracking Earth Armor[1] setarray .ids3[0],2364, // Meteor Plate[1] 2365, // Orlean's Uniform[1] 2375, // Diabolus Robe[1] 2374, // Diabolus Armor[1] 2357, // Valkyrian Armor[1] 2387, // Sprint Mail[1] 2389, // Kandra[1] || Gandora[1] 2388, // Naga Scale Armor[1] 2391, // Life Link[1] 2390, // Refined Tights[1] 2376, // Assaulter Plate[1] 2377, // Elite Engineer Armor[1] 2378, // Assassin Robe[1] 2379, // Warlock Battle Robe[1] 2380, // Robe of Order[1] 2381, // Elite Archer Suit[1] 2382; // Elite Shooter Suit[1] end; }
  8. Bump, i tried with this i mean copying the space btw "item16" , and the id, and nothing, also i tried with tab and nothing, how can i add more than just 1 option ¿? even i tired adding twice the same line but no error on console and also not working :/ please help with that :/
  9. Hi, rAthena Community i've some questions about mob_skill_db... is there a limit about how many skills for a mob ¿? i tried create mob customs and editing some mobs already created but on console a error on my mapserver show something about "Too many skills for monster" so... is there a limit ¿? also... is there... is anyway to increase the limit ¿? on some minutes i gonna try add a screenshot about what happen :/ With short words...Questions: 1.- is there a skill limit for a mob? 2a.- if yes... the last one, is there a way to increase the limit? 2b.- if no... so why that message show about "too many skills for a monster" ? Edit: Searching more i found this... so... for custom mobs i should put on "import" that could solve the problem... but also would work with no-custom mobs ¿?
  10. Thx gonna try it ^^ Tested and is working now... just a question if i wanna add more options i mean "orbs" how can i do it ¿? i tried with this... but didn't work prontera,193,188,4 script Katonai 821,{ mes .npc$; mes "Hello there!"; mes "I can enchant your items,"; mes "for a small fee of "+.pric+"z."; emotion e_no1,0; next; if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; } if(Zeny<.pric) { mes .npc$; mes "I'm sorry you don't have enough Zeny, please come back later."; close; } mes .npc$; mes "Which item would you like to enchant?"; next; for( .@a = 0; .@a < .e_len; .@a++ ) { if(getequipid(.equiploc[.@a])>-1) { set .@menu$, .@menu$+.eqp$[.@a]+"- [^0000FF"+getitemname(getequipid(.equiploc[.@a]))+"^000000]:"; } else { set .@menu$, .@menu$+"^adb4be"+.eqp$[.@a]+"- [Empty]^000000:"; } } select(.@menu$); set .@eq_loc, .equiploc[@menu-1]; set .@eq_itm, getequipid(.@eq_loc); if(.@eq_itm<0) { mes .npc$; mes "Hmm, I don't think you have anything equipped there."; close; } set .@menu$, ""; set(.@eq,(getiteminfo(.@eq_itm,2)==4?4:.@eq_loc)); for(set(.@b,0);.@b<getarraysize(getd(".itm"+.@eq));set(.@b,.@b+1)) { set(.@items,getd(".itm"+.@eq+"["+.@b+"]")); if(getiteminfo(.@items,2)>-1) if(set(.@c,countitem(.@items))) { set .@menu$, .@menu$+getitemname(.@items)+" x"+.@c+":"; set .@b,.@b+1; set .@item[.@b], .@items; } } if(.@menu$=="") { mes .npc$; mes "Hmm, you don't seem to have any enchantment orbs for that equipment."; close; } mes .npc$; mes "Please, select an enchantment from the menu."; next; select(.@menu$); set .@itm, .@item[@menu]; set .@menu$, ""; set .@a, 0; while((set(.@a,.@a+1)-1)<4) { setd(".@crd"+.@a, getequipcardid(.@eq_loc,.@a-1)); if(getequipcardid(.@eq_loc,.@a-1)) set .@menu$, .@menu$+.@a+.crd_c$[.@a-1]+" Slot- [^a92435"+getitemname(getequipcardid(.@eq_loc,.@a-1))+"^000000]:"; else set .@menu$, .@menu$+.@a+.crd_c$[.@a-1]+" Slot- [^30ad25Empty^000000]:"; } mes .npc$; mes "Select a slot."; next; set(.@slot,select(.@menu$)-1); set .@eqrf, getequiprefinerycnt(.@eq_loc); if(getequipcardid(.@eq_loc,.@slot)) { getitem getequipcardid(.@eq_loc,.@slot),1; delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4; setd(".@crd"+@menu, 0); getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4; close; } if(rand(101)>.perc[.@slot]) { mes .npc$; mes "I'm sorry but I've failed you!"; misceffect 155; emotion e_sob,0; set Zeny,Zeny-.pric; close; } set Zeny,Zeny-.pric; delitem .@itm,1; delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4; setd(".@crd"+@menu, .@itm); getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4; misceffect .efet; emotion e_no1,0; mes .npc$; mes "All done!"; equip .@eq_itm; close; //NPC Constants OnInit: //=-=-=-=-=-=-=Configuration=-=-=-=-=-=-= set .npc$ , "[^0000FFEnchant Expert^000000]"; // NPC Name set .pric , 1000000; // Price set .efet , 154; // Effect Number setarray .perc , 100,80,50,10; // Percent slot setarray .crd_c$, "st", "nd", "rd", "th"; // Count setarray .itm32 , 29101, 4858; // Sheilds setarray .itm16 , 29101, 4857; // Armor setarray .itm4 , 29101, 4856; // Garment setarray .itm64 , 29101, 4855; // Footgear setarray .itm128 , 29101, 4854; // Accessory1 setarray .itm10 , 29101, 4853; // Accessory2 setarray .itm2 , 29101; // Weapon setarray .itm1 , 29101; // Low Headgear setarray .itm512 , 29101; // Mid Headgear setarray .itm256 , 29101; // Upper Headgear setarray .eqp$ , "Upper Headgear", "Mid Headgear", "Low Headgear", "Armor", "Left Hand", "Right Hand", "Garment", "Shoes", "Accessory1", "Accessory2"; setarray .equiploc, EQI_HEAD_TOP, EQI_HEAD_MID, EQI_HEAD_LOW, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R; set .e_len , getarraysize(.eqp$); //=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-= } i mean i just add ",<space>Item_ID;" but only the first option is show and no the new options i added even having the items on inventory, Thx!
  11. Hi, rAthena Community i've this scripts, but when i select first slot, it equip to 2nd, then i try to select 2nd, but i cant only can uncard, so i select 3rd slot and it select the 4th slot... so i can set cards on 1st and 3rd slot only on 2nd and 4th :/ how can i solve this ? Thx! prontera,193,188,4 script Katonai 821,{ mes .npc$; mes "Hello there!"; mes "I can enchant your items,"; mes "for a small fee of "+.pric+"z."; emotion e_no1,0; next; if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; } if(Zeny<.pric) { mes .npc$; mes "I'm sorry you don't have enough Zeny, please come back later."; close; } mes .npc$; mes "Which item would you like to enchant?"; next; for( .@a = 0; .@a < .e_len; .@a++ ) { if(getequipid(.equiploc[.@a])>-1) { set .@menu$, .@menu$+.eqp$[.@a]+"- [^0000FF"+getitemname(getequipid(.equiploc[.@a]))+"^000000]:"; } else { set .@menu$, .@menu$+"^adb4be"+.eqp$[.@a]+"- [Empty]^000000:"; } } select(.@menu$); set .@eq_loc, .equiploc[@menu-1]; set .@eq_itm, getequipid(.@eq_loc); if(.@eq_itm<0) { mes .npc$; mes "Hmm, I don't think you have anything equipped there."; close; } set .@menu$, ""; set(.@eq,(getiteminfo(.@eq_itm,2)==4?4:.@eq_loc)); for(set(.@b,0);.@b<getarraysize(getd(".itm"+.@eq));set(.@b,.@b+1)) { set(.@items,getd(".itm"+.@eq+"["+.@b+"]")); if(getiteminfo(.@items,2)>-1) if(set(.@c,countitem(.@items))) { set .@menu$, .@menu$+getitemname(.@items)+" x"+.@c+":"; set .@b,.@b+1; set .@item[.@b], .@items; } } if(.@menu$=="") { mes .npc$; mes "Hmm, you don't seem to have any enchantment orbs for that equipment."; close; } mes .npc$; mes "Please, select an enchantment from the menu."; next; select(.@menu$); set .@itm, .@item[@menu]; set .@menu$, ""; set .@a, 0; while((set(.@a,.@a+1)-1)<4) { setd(".@crd"+.@a, getequipcardid(.@eq_loc,.@a-1)); if(getequipcardid(.@eq_loc,.@a-1)) set .@menu$, .@menu$+.@a+.crd_c$[.@a-1]+" Slot- [^a92435"+getitemname(getequipcardid(.@eq_loc,.@a-1))+"^000000]:"; else set .@menu$, .@menu$+.@a+.crd_c$[.@a-1]+" Slot- [^30ad25Empty^000000]:"; } mes .npc$; mes "Select a slot."; next; set(.@slot,select(.@menu$)-1); set .@eqrf, getequiprefinerycnt(.@eq_loc); if(getequipcardid(.@eq_loc,.@slot)) { mes .npc$; mes "Would you like me to remove this card?"; next; if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; } getitem getequipcardid(.@eq_loc,.@slot),1; delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4; setd(".@crd"+(@menu+1), 0); getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4; } if(rand(101)>.perc[.@slot]) { mes .npc$; mes "I'm sorry but I've failed you!"; misceffect 155; emotion e_sob,0; set Zeny,Zeny-.pric; close; } set Zeny,Zeny-.pric; delitem .@itm,1; delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4; setd(".@crd"+(@menu+1), .@itm); getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4; misceffect .efet; emotion e_no1,0; mes .npc$; mes "All done!"; equip .@eq_itm; close; //NPC Constants OnInit: //=-=-=-=-=-=-=Configuration=-=-=-=-=-=-= set .npc$ , "[^0000FFEnchant Expert^000000]"; // NPC Name set .pric , 1000000; // Price set .efet , 154; // Effect Number setarray .perc , 100,80,50,10; // Percent slot setarray .crd_c$, "st", "nd", "rd", "th"; // Count setarray .itm32 , 29101; // Sheilds setarray .itm16 , 29101; // Armor setarray .itm4 , 29101; // Garment setarray .itm64 , 29101; // Footgear setarray .itm128 , 29101; // Accessory1 setarray .itm10 , 29101; // Accessory2 setarray .itm2 , 29101; // Weapon setarray .itm1 , 29101; // Low Headgear setarray .itm512 , 29101; // Mid Headgear setarray .itm256 , 29101; // Upper Headgear setarray .eqp$ , "Upper Headgear", "Mid Headgear", "Low Headgear", "Armor", "Left Hand", "Right Hand", "Garment", "Shoes", "Accessory1", "Accessory2"; setarray .equiploc, EQI_HEAD_TOP, EQI_HEAD_MID, EQI_HEAD_LOW, EQI_ARMOR, EQI_HAND_L, EQI_HAND_R, EQI_GARMENT, EQI_SHOES, EQI_ACC_L, EQI_ACC_R; set .e_len , getarraysize(.eqp$); //=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-= } as you can see on the image below the 2nd and 4th is not problem but i cant equip on 1st and 3rd, if i pick 1st... it equip on 2nd, if i pick 2nd, it jus tell me about remove, if i pick 3rd, it equipo to 4th, if i try again on 1st o 3rd, it egain re-equip on 2nd or 4th :/
  12. Thx i'll test it, some mistakes with ) ; i've fixed those mistakes only 2 "problems" 1.- you can check it on the image below (this problem happen just sometimes, most offen with 675 - silver coin) 2.- all the progress bar have the same duration. they had all the same but no, actually the one slower was the one with the error the silver coin (675) is the slowest, and the others 3, have a similar speed: if i only have a coin of the same type all the progress are 10 seconds and when i've the 4, each one have the speed they should have, but after use gold or platinum bronze and silver change to 10 seconds (with bronze its ok, but with silver not). Script fixed with the problems with ")" and ";". prontera,158,173,4 script CoinExchanger 88,{ mes("Welcome"); mes("Please give me your coins..."); // Check Inventory for Coins getinventorylist; freeloop(true); for(.@coin_index = 0; .@coin_index < getarraysize(.exchange_ids); .@coin_index++) { for(.@i = 0; .@i < @inventorylist_count; .@i++) { if (@inventorylist_id[.@i] == .exchange_ids[.@coin_index]) { if (@inventorylist_amount[.@i] >= .exchange_amount[.@coin_index]) { set(.@menu_coin_index[getarraysize(.@menu_coin_index)], .@coin_index); set(.@menu$, ( .@menu$ = "" ? "" : ":" ) + getitemname(.exchange_ids[.@coin_index]) + "(" + @inventorylist_amount[.@i] + ")"); } } } } freeloop(false); // Display Option to Show them choices and how many coins they have... set .@choice, select(.@menu$) - 1; // Subtract 1 to get Array Index set .@index, .@menu_coin_index[.@choice]; dispbottom("You have chosen to use " + getitemname(.exchange_ids[.@index]) ); progressbar("00FF00", .exchange_duration[.@index]); // Start the Progressbar // On Progress Bar Completion... let's see what we do here... delitem(.exchange_ids[.@index], .exchange_amount[.@index]); freeloop(true); for(.@i = 0; .@i < getarraysize(.available_items); .@i++) { .@random = rand(1, 100); if (.@random <= .available_chance[.@i]) { // GET THE ITEM mes "Here you go"; getitem(.available_items[.@i], .available_amount[.@i]); if (.available_chance[.@i] <= .announce_level_chance) { announce(strcharinfo(0) + " just scored " + getitemname(.exchange_ids[.@index]), bc_all, C_YELLOW); } close; } } freeloop(false); mes("You got the default prize..."); getitem(.default_item, .default_amount); close; OnInit: setarray(.exchange_ids, 673, 675, 671, 677); setarray(.exchange_amount, 1, 1, 1, 1); setarray(.exchange_duration, 10, 8, 5, 2); // # of seconds to progressbar... setarray(.available_items, 501, 502, 503, 504); setarray(.available_amount, 1, 1, 1, 1); setarray(.available_chance, 50, 40, 30, 10); // % of 100 set(.announce_level_chance, 10); // Will only display announce if they get item 504... since it's the only one with 10 chance or lower set(.default_item, 501); set(.default_amount, 1); end; } Also... if i click somewhere else the progress bar cancel and i stuck (im agree with the cancel, but no with the stuck ><).
  13. Hi, rAthena Community i wanna request a NPC with this... i guess is possible because i saw a similar time ago (was a fishing npc as i remember...) The NPC Requested: 1.- the NPC will give you 1 item at random of a list of X amount of items (i dont know could get a jellopy or a fluff or a poring coing, etc). 2.- before the NPC give you that random item, first the npc will ask you to give 1 of the next 4 items: Bronze Coin(673), Silver Coin (675), Gold Coin (671) & Platinum Coin (677). 3.- if you give bronze coin, a progressbar will show with a duration of 10 seconds, if you give silver again a progressbar with 8 seconds... gold -> 5 seconds, platinum - 2 seconds. The percent (%) of the items i want they be editable (i mean i can select if 10% which item, or 1%, etc). After the progressbar start... the npc will deleted your item (coin). Extra: if could add something like an announce when the player get a "very rare item" would be nice. Thx... as i said i saw a similar NPC like this some years ago was a fishing script or something like that, that fishing npc tell you that you need a fishing bait, and stuff like that as i remember... that npc had the progress bar also the announce, the 1 item of a list and the % of the items, the only thing that didnt have was that option of "if you give this item the wait will be less" i gonna try find that script to have a better idea... and adding that script here if helps thx... if dont understand something... just tell me to explain it better Edit: these are the scripts i found and were "similar" that i want: prontera,160,172,0 script Fishing Hole 844,{ //Fishing rod set .@Rod,2764; //Fishing Lure set .@Lure,2775; //Auto-Fish set .@Auto,1; //Auto-Fish on Fail set .@AutoFail,1; Fish: if (isequipped(.@Rod)) && (isequipped(.@Lure)){ specialeffect EF_BUBBLE,"Fishing Hole"; soundeffect "fishingrod.wav",0; dispbottom "[Fishing] Casting..."; set .@fcast,15; if (isequipped(2550)) { //Fisher's Muffler set .@fcast,.@fcast - 2; } if (isequipped(2443)) { //Fisher's Boots set .@fcast,.@fcast - 2; } if (isequipped(2764)) { //Fishing Pole set .@fcast,.@fcast - 3; } if (isequipped(2775)) { //Fishing Lure set .@fcast,.@fcast - 1; } progressbar "ffffff",.@fcast; if (rand(1,20) == 2){ getitem 6096,1; //Fish with Blue Back specialeffect2 EF_TEMP_OK; soundeffectall "success.wav",0,strcharinfo(3); mapannounce strcharinfo(3),strcharinfo(0)+" has caught a Blue Fish!",bc_map,"0xff77ff"; if(.@Auto==1){ goto Fish;}else{ end;} } if (rand(1,6) == 1) ||(rand(1,6) == 3) || (rand(1,6) == 6){ setarray .@Catch[0],579,908,909,963,956,6049,918,960,910,938,624;// List of Junk/Other set .@CatchRand,.@Catch[rand(getarraysize(.@Catch))]; getitem .@CatchRand,1; } else { dispbottom "[Fishing] Nothing was caught..."; if(.@AutoFail == 1){ goto Fish;} else{ end;} } if (rand(1,100) == 3){ setarray .@Rare[0],644,603,617; set .@RareCatch, .@Rare[rand(getarraysize(.@Rare))]; getitem .@RareCatch,1; //Reward mapannounce strcharinfo(3),strcharinfo(0)+" has caught a "+getitemname(.@RareCatch)+"!",bc_map,"0x33CC00"; } if(.@Auto == 1){ goto Fish;} else{ end;} } else { dispbottom "[Fishing] You need a Rod and Lure."; end; } } also this comodo,196,112,6 script School of Fish 723,{ if(countitem(632) < 1) goto L_Exit; L_Exit: mes "You do not have Fatty Chubby."; close; delitem 632,1; if (isequipped(2764)) && (isequipped(2775)){ specialeffect2 EF_BUBBLE; set .@fcast,15; if (isequipped(2550)) set .@fcast,.@fcast-3; //Fisher's Muffler. } if (isequipped(2443)) set .@fcast,.@fcast-2; //Fish_Shoes } if (isequipped(5380)) set .@fcast,.@fcast-5; //Fish_Shoes } progressbar "ffffff",.@fcast; if (rand(1,20) == 2) { getitem 6096,5; //Big Fish specialeffect EF_BUBBLE; mapannounce "comodo","" + strcharinfo(0) + " has caught a 5 Tuna!!!",bc_map,"0xff77ff"; end; } set .@rhea_ran,rand(1,70); if (.@rhea_ran < 20) { specialeffect2 610; getitem 29183,1; //Anchovy } else if (.@rhea_ran == 20) { specialeffect2 610; getitem 29184,1; //Bass } else if (.@rhea_ran == 21) { specialeffect2 610; getitem 29185,1; //Crab } else if (.@rhea_ran == 22) { specialeffect2 610; getitem 29186,1; //Eel } else if (.@rhea_ran == 23) { specialeffect2 610; getitem 29187,1; //Jelly Fish } else if (.@rhea_ran == 24) { specialeffect2 610; getitem 29188,1; //Lobster } else if (.@rhea_ran == 25) { specialeffect2 610; getitem 29189,1; //Perch } else if (.@rhea_ran == 26) { specialeffect2 610; getitem 29190,1; //Pike } else if (.@rhea_ran == 27) { specialeffect2 610; getitem 29191,1; //Puffer } else if (.@rhea_ran == 28) { specialeffect2 610; getitem 9192,1; //Salmon } else if ((.@rhea_ran > 28) && (.@rhea_ran < 40)) { specialeffect2 610; getitem 632,1; //Fatty Chubby Earthworm } else { mes "Nothing was caught."; specialeffect2 611; close; } if (rand(1,200) == 3) { getitem 6096,20; //Gift_Box mapannounce "comodo","" + strcharinfo(0) + " has caught a 20 Tuna Fish!!",bc_map,"0x0000ff"; } if (rand(1,500) == 3) { getitem 6096,30; //Old_Blue_Box mapannounce "comodo","" + strcharinfo(0) + " has caught an 30 Tuna Fish!",bc_map,"0x00ffff"; } if (rand(1,3000) == 3) { getitem 6096,50; //Old_Violet_Box mapannounce "comodo","" + strcharinfo(0) + " has caught an 50 Tuna Fish!!",bc_map,"0x44ff44"; } end; } else { mes "Fish are swimming in the water."; close; } } comodo.gat,189,108,4 duplicate(School of Fish) School of Fish#1 1158 comodo.gat,183,111,4 duplicate(School of Fish) Tilapya#20 2082 comodo.gat,218,108,4 duplicate(School of Fish) School of Fish#21 1069 comodo.gat,228,108,3 duplicate(School of Fish) School of Fish#22 1158 comodo.gat,214,112,4 duplicate(School of Fish) School of Fish#23 723 comodo.gat,189,122,4 duplicate(School of Fish) Mr Crab#23 1073 comodo.gat,192,106,4 duplicate(School of Fish) Octopus#23 1144 //Shop comodo,205,112,4 shop Bulantiro 1543,2764:50000000,2775:50000000,2550:100000000,2443:200000000 those scripts its to have a more clear idea
  14. So, in short word i've to edit whole the word and not only add/change numbers right? ok i do it, tested and looks like all working, no console error, and anything. Well All Solved, Thx @sader1992 can close if want ^^.
  15. oh sorry that its ok (im a mexican so i had to translate from spanish to english, is already correct with the " ". the npc run with any problem, but when i try to open the "weapons" or the "equipment" or the "etc" the npc just close and on console that error message show, this.
  16. ok i'll put both scripts the "original" that has the "qshop" and the new that i put "qshop1" the first npc with that structure //===== rAthena Script ======================================= //= Euphy's Quest Shop //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.6 //===== Compatible With: ===================================== //= rAthena SVN r16862+ //===== Description: ========================================= //= A dynamic quest shop based on Lunar's, with easier config. //= Includes support for multiple shops & cashpoints. //= Item Preview script by ToastOfDoom. //============================================================ // Shop NPCs -- supplying no argument displays entire menu. // callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}}; //============================================================ prontera,158,179,6 script Woe Coins Trader#1 998,{ callfunc "qshop"; } // Script Core //============================================================ - script woe_shop -1,{ function Add; function Chk; function Slot; function A_An; OnInit: freeloop(1); // ----------------------------------------------------------- // Basic shop settings. // ----------------------------------------------------------- set .Announce,0; // Announce quest completion? (1: yes / 0: no) set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never) set .ShowID,0; // Show item IDs? (1: yes / 0: no) set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no) set .MaxStack,100; // Max number of quest items purchased at one time. // ----------------------------------------------------------- // Points variable -- optional quest requirement. // setarray .Points$[0],"<variable name>","<display name>"; // ----------------------------------------------------------- setarray .Points$[0],"#CASHPOINTS","Cash Points"; // ----------------------------------------------------------- // Shop IDs -- to add shops, copy dummy data at bottom of file. // setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...}; // ----------------------------------------------------------- setarray .Shops$[1],"Headgears","Weapons","Other"; // ----------------------------------------------------------- // Quest items -- do NOT use a reward item more than once! // Add(<shop ID>,<reward ID>,<reward amount>, // <Zeny cost>,<point cost>, // <required item ID>,<required item amount>{,...}); // ----------------------------------------------------------- Add(1,7539,5,0,0,7608,1); // Add(1,20307,10,0,0,7608,1); Add(1,607,25,0,0,7608,1); Add(1,12020,25,0,0,7608,1); Add(1,12114,25,0,0,7608,1); Add(1,12115,25,0,0,7608,1); Add(1,12116,25,0,0,7608,1); Add(1,12117,25,0,0,7608,1); Add(1,12254,10,0,0,7608,1); Add(1,12252,10,0,0,7608,1); Add(1,12253,10,0,0,7608,1); Add(1,12255,10,0,0,7608,1); Add(1,12251,10,0,0,7608,1); Add(1,12250,10,0,0,7608,1); Add(1,14542,10,0,0,7608,1); Add(1,14544,10,0,0,7608,1); Add(1,12103,10,0,0,7608,1); Add(1,12429,10,0,0,7608,10); Add(1,12430,10,0,0,7608,10); Add(1,12431,10,0,0,7608,10); Add(1,12432,10,0,0,7608,10); Add(1,12433,10,0,0,7608,10); Add(1,12434,10,0,0,7608,10); Add(1,12412,1,0,0,7608,10); Add(1,12123,10,0,0,7608,1); Add(1,12198,10,0,0,7608,15); Add(1,14607,5,0,0,7608,10); Add(1,14608,5,0,0,7608,20); Add(1,14535,5,0,0,7608,25); Add(1,12299,5,0,0,7608,25); Add(1,12246,1,0,0,7608,1); Add(1,12134,1,0,0,7608,1); Add(1,14537,5,0,0,7608,25); Add(1,12122,10,0,0,7608,1); Add(1,12548,1,0,0,7608,1); Add(1,12298,1,0,0,7608,1); Add(1,12016,25,0,0,7608,1); Add(1,12591,1,0,0,7608,1); // Add(1,); // Add(1,); // Add(1,); // Add(1,); // Add(1,); Add(2,1224,1,0,0,7297,30,969,10,999,50,714,10); Add(2,1225,1,0,0,7292,30,969,10,999,50,714,10); Add(3,531,1,3,0,512,1,713,1); Add(3,532,1,3,0,513,1,713,1); Add(3,533,1,3,0,514,1,713,1); Add(3,534,1,3,0,515,1,713,1); // ----------------------------------------------------------- freeloop(0); set .menu$,""; for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) { set .menu$, .menu$+.Shops$[.@i]+":"; npcshopdelitem "qshop"+.@i,909; } end; OnMenu: set .@size, getarraysize(@i); if (!.@size) set .@i, select(.menu$); else if (.@size == 1) set .@i, @i[0]; else { for(set .@j,0; .@j<.@size; set .@j,.@j+1) set .@menu$, .@menu$+.Shops$[@i[.@j]]+":"; set .@i, @i[select(.@menu$)-1]; } deletearray @i[0],getarraysize(@i); if (.Shops$[.@i] == "") { message strcharinfo(0),"An error has occurred."; end; } dispbottom "Select one item at a time."; callshop "qshop"+.@i,1; npcshopattach "qshop"+.@i; end; OnBuyItem: // .@q[] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... } setarray .@q[0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]); copyarray .@q[3],getd(".q_"+.@q[0]+"[0]"),getarraysize(getd(".q_"+.@q[0])); set .@q[2],.@q[1]*.@q[3]; if (!.@q[2] || .@q[2] > 30000) { message strcharinfo(0),"You can't purchase that many "+getitemname(.@q[0])+"."; end; } mes "[Woe Coins Trader]"; mes "Reward: ^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"")+Slot(.@q[0])+"^000000"; mes "Requirements:"; if (.@q[4]) mes " > "+Chk(Zeny,.@q[4]*.@q[1])+(.@q[4]*.@q[1])+" Zeny^000000"; if (.@q[5]) mes " > "+Chk(getd(.Points$[0]),.@q[5]*.@q[1])+(.@q[5]*.@q[1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+(.@q[5]*.@q[1])+")^000000"; if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000"; next; setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11); if (((@qe[1] & 1) || (@qe[1] & 256) || (@qe[1] & 512)) && @qe[2] > 0) set .@preview,1; addtimer 1000, strnpcinfo(0)+"::OnEnd"; while(1) { switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[6])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) { case 1: if (@qe[0]) { mes "[Woe Coins Trader]"; mes "You're missing one or more quest requirements."; close; } if (!checkweight(.@q[0],.@q[2])) { mes "[Woe Coins Trader]"; mes "^FF0000You need "+(((.@q[2]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000"; close; } if (.@q[4]) set Zeny, Zeny-(.@q[4]*.@q[1]); if (.@q[5]) setd .Points$[0], getd(.Points$[0])-(.@q[5]*.@q[1]); if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) delitem .@q[.@i],.@q[.@i+1]*.@q[1]; getitem .@q[0],.@q[2]; if (.Announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):A_An(getitemname(.@q[0])))+"!",0; specialeffect2 699; close; case 2: setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), 1; if (@qe[1] & 1) changelook LOOK_HEAD_BOTTOM, @qe[2]; if (@qe[1] & 256) changelook LOOK_HEAD_TOP, @qe[2]; if (@qe[1] & 512) changelook LOOK_HEAD_MID, @qe[2]; break; case 3: close; } } OnEnd: if (@qe[6]) { changelook LOOK_HEAD_BOTTOM, @qe[3]; changelook LOOK_HEAD_TOP, @qe[4]; changelook LOOK_HEAD_MID, @qe[5]; } deletearray @qe[0],7; end; function Add { if (getitemname(getarg(1)) == "null") { debugmes "Quest reward #"+getarg(1)+" invalid (skipped)."; return; } setarray .@j[0],getarg(2),getarg(3),getarg(4); for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) { if (getitemname(getarg(.@i)) == "null") { debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped)."; return; } else setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1); } copyarray getd(".q_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j); npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0); return; } function Chk { if (getarg(0) < getarg(1)) { set @qe[0],1; return "^FF0000"; } else return "^00FF00"; } function Slot { set .@s$,getitemname(getarg(0)); switch(.ShowSlot) { case 1: if (!getitemslots(getarg(0))) return .@s$; case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]"; default: return .@s$; } } function A_An { setarray .@A$[0],"a","e","i","o","u"; set .@B$, "_"+getarg(0); for(set .@i,0; .@i<5; set .@i,.@i+1) if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0); return "a "+getarg(0); } } function script qshop { deletearray @i[0],getarraysize(@i); for(set .@i,0; .@i<getargcount(); set .@i,.@i+1) set @i[.@i],getarg(.@i); doevent "woe_shop::OnMenu"; end; } // Dummy shop data -- copy as needed. //============================================================ - shop qshop1 -1,909:-1 - shop qshop2 -1,909:-1 - shop qshop3 -1,909:-1 - shop qshop4 -1,909:-1 - shop qshop5 -1,909:-1 the one you created just edited //===== rAthena Script ======================================= //= Euphy's Quest Shop //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.6c //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= A dynamic quest shop based on Lunar's, with easier config. //= Includes support for multiple shops & cashpoints. //= Item Preview script by ToastOfDoom. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.2 Added category support. //= 1.3 More options and fixes. //= 1.4 Added debug settings. //= 1.5 Replaced categories with shop IDs. //= 1.6 Added support for purchasing stackables. //= 1.6a Added support for previewing costumes and robes. //= 1.6b Added 'disable_items' command. //= 1.6c Replaced function 'A_An' with "F_InsertArticle". //============================================================ // Shop NPCs -- supplying no argument displays entire menu. // callfunc "qshop1"{,<shop ID>{,<shop ID>{,...}}}; //============================================================ prontera,165,164,3 script Sample 997,{ callfunc "myquest"; } // Script Core //============================================================ - script vps_shop -1,{ function Add; function Chk; function Slot; OnInit: freeloop(1); // ----------------------------------------------------------- // Basic shop settings. // ----------------------------------------------------------- set .Announce,0; // Announce quest completion? (1: yes / 0: no) set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never) set .ShowID,0; // Show item IDs? (1: yes / 0: no) set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no) set .MaxStack,100; // Max number of quest items purchased at one time. // ----------------------------------------------------------- // Points variable -- optional quest requirement. // setarray .Points$[0],"<variable name>","<display name>"; // ----------------------------------------------------------- setarray .Points$[0],"SPOINTS","Sample Points"; // ----------------------------------------------------------- // Shop IDs -- to add shops, copy dummy data at bottom of file. // setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...}; // ----------------------------------------------------------- setarray .Shops$[1],"Weapons","Equipment","Etc"; // ----------------------------------------------------------- // Quest items -- do NOT use a reward item more than once! // Add(<shop ID>,<reward ID>,<reward amount>, // <Zeny cost>,<point cost>, // <required item ID>,<required item amount>{,...}); // ----------------------------------------------------------- Add(1,16028,1,0,1000,6470,50,4368,10,671,10); Add(1,28100,1,0,1000,6470,50,4368,10,671,10); Add(1,18119,1,0,1000,6470,50,4368,10,671,10); Add(1,13093,1,0,1000,6470,50,4368,10,671,10); Add(1,21009,1,0,1000,6470,50,4368,10,671,10); Add(1,28000,1,0,1000,6470,50,4368,10,671,10); Add(1,1836,1,0,1000,6470,50,4368,10,671,10); Add(1,1438,1,0,1000,6470,50,4368,10,671,10); Add(1,1669,1,0,1000,6470,50,4368,10,671,10); Add(1,13441,1,0,1000,6470,50,4368,10,671,10); Add(1,1496,1,0,1000,6470,50,4368,10,671,10); Add(1,2023,1,0,1000,6470,50,4368,10,671,10); Add(1,1933,1,0,1000,6470,50,4368,10,671,10); Add(1,1988,1,0,1000,6470,50,4368,10,671,10); Add(2,15090,1,0,1000,6470,50,4368,10,671,10); Add(2,22033,1,0,1000,6470,50,4368,10,671,10); Add(2,18820,1,0,1000,6470,50,4368,10,671,10); Add(2,20721,1,0,1000,6470,50,4368,10,671,10); Add(2,15091,1,0,1000,6470,50,4368,10,671,10); Add(2,6672,1,0,1000,6470,50,4368,10,671,10); Add(2,2187,1,0,1000,6470,50,4368,10,671,10); Add(3,7421,1,0,100); Add(3,7422,1,0,200); Add(3,7423,1,0,300); // ----------------------------------------------------------- freeloop(0); set .menu$,""; for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) { set .menu$, .menu$+.Shops$[.@i]+":"; npcshopdelitem "qshop1"+.@i,909; } end; OnMenu: set .@size, getarraysize(@i); if (!.@size) set @shop_index, select(.menu$); else if (.@size == 1) set @shop_index, @i[0]; else { for(set .@j,0; .@j<.@size; set .@j,.@j+1) set .@menu$, .@menu$+.Shops$[@i[.@j]]+":"; set @shop_index, @i[select(.@menu$)-1]; } deletearray @i[0],getarraysize(@i); if (.Shops$[@shop_index] == "") { message strcharinfo(0),"An error has occurred."; end; } dispbottom "Select one item at a time."; callshop "qshop1"+@shop_index,1; npcshopattach "qshop1"+@shop_index; end; OnBuyItem: // .@q[] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... } setarray .@q[0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]); copyarray .@q[3],getd(".q_"+@shop_index+"_"+.@q[0]+"[0]"),getarraysize(getd(".q_"+@shop_index+"_"+.@q[0])); set .@q[2],.@q[1]*.@q[3]; if (!.@q[2] || .@q[2] > 30000) { message strcharinfo(0),"You can't purchase that many "+getitemname(.@q[0])+"."; end; } mes "[Sample]"; mes "Reward: ^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"")+Slot(.@q[0])+"^000000"; mes "Requirements:"; disable_items; if (.@q[4]) mes " > "+Chk(Zeny,.@q[4]*.@q[1])+(.@q[4]*.@q[1])+" Zeny^000000"; if (.@q[5]) mes " > "+Chk(getd(.Points$[0]),.@q[5]*.@q[1])+(.@q[5]*.@q[1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+(.@q[5]*.@q[1])+")^000000"; if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000"; next; setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11); if (@qe[2] > 0 && ((@qe[1] & EQP_HEAD_LOW) || (@qe[1] & EQP_HEAD_TOP) || (@qe[1] & EQP_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_TOP) || (@qe[1] & EQP_COSTUME_HEAD_MID) || (@qe[1] & EQP_COSTUME_HEAD_LOW) || (@qe[1] & EQP_GARMENT) || (@qe[1] & EQP_COSTUME_GARMENT))) set .@preview,1; addtimer 1000, strnpcinfo(0)+"::OnEnd"; while(1) { switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[7])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) { case 1: if (@qe[0]) { mes "[Sample]"; mes "You're missing one or more quest requirements."; close; } if (!checkweight(.@q[0],.@q[2])) { mes "[Sample]"; mes "^FF0000You need "+(((.@q[2]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000"; close; } if (.@q[4]) set Zeny, Zeny-(.@q[4]*.@q[1]); if (.@q[5]) setd .Points$[0], getd(.Points$[0])-(.@q[5]*.@q[1]); if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) delitem .@q[.@i],.@q[.@i+1]*.@q[1]; getitem .@q[0],.@q[2]; if (.Announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):callfunc("F_InsertArticle",getitemname(.@q[0])))+"!",0; specialeffect2 EF_FLOWERLEAF; close; case 2: setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), getlook(LOOK_ROBE), 1; if ((@qe[1] & 1) || (@qe[1] & 4096)) changelook LOOK_HEAD_BOTTOM, @qe[2]; else if ((@qe[1] & 256) || (@qe[1] & 1024)) changelook LOOK_HEAD_TOP, @qe[2]; else if ((@qe[1] & 512) || (@qe[1] & 2048)) changelook LOOK_HEAD_MID, @qe[2]; else if ((@qe[1] & 4) || (@qe[1] & 8192)) changelook LOOK_ROBE, @qe[2]; break; case 3: close; } } OnEnd: if (@qe[7]) { changelook LOOK_HEAD_BOTTOM, @qe[3]; changelook LOOK_HEAD_TOP, @qe[4]; changelook LOOK_HEAD_MID, @qe[5]; changelook LOOK_ROBE, @qe[6]; } deletearray @qe[0],8; end; function Add { if (getitemname(getarg(1)) == "null") { debugmes "Quest reward #"+getarg(1)+" invalid (skipped)."; return; } setarray .@j[0],getarg(2),getarg(3),getarg(4); for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) { if (getitemname(getarg(.@i)) == "null") { debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped)."; return; } else setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1); } copyarray getd(".q_"+getarg(0)+"_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j); npcshopadditem "qshop1"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0); return; } function Chk { if (getarg(0) < getarg(1)) { set @qe[0],1; return "^FF0000"; } else return "^00FF00"; } function Slot { set .@s$,getitemname(getarg(0)); switch(.ShowSlot) { case 1: if (!getitemslots(getarg(0))) return .@s$; case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]"; default: return .@s$; } } } function script qshop1 { deletearray @i[0],getarraysize(@i); for(set .@i,0; .@i<getargcount(); set .@i,.@i+1) set @i[.@i],getarg(.@i); doevent "vps_shop::OnMenu"; end; } function script myquest { if(VPS < 1){ callfunc "qshop1"; }else{ mes "really thinks that you can with me just like that?; close; } end; } // Dummy shop data -- copy as needed. //============================================================ - shop qshop6 -1,909:-1 - shop qshop7 -1,909:-1 - shop qshop8 -1,909:-1 - shop qshop9 -1,909:-1 - shop qshop10 -1,909:-1 im really thinking that is because one is more updated than other but.. dunno i mean one is "1.6" and other "1.6c" but i dont think is for that.
  17. Main problem Solved just one last noob question if i gonna put more than 1 of thes i tried changing to "qshop1" but once i click on the menu it just close and this happen
  18. sorry for delay, ok a working example could be this @sader1992 prontera,164,168,3 script Sample 997,{ if (QVS == 1) { mes "[Sample]"; mes "..."; warp "prontera",155,172; end;} if ( countitem(2861) == 1 ) { mes "[Sample]"; mes "..."; mes "....?"; mes "..."; set QVS,1; delitem 2861,1; end;} if ( QVS < 1 ) goto L_Start; L_Start: mes "Helo, are you interested of be one of us?"; next; mes "Yeah? ok you only need bring me a Skull"; mes "And then we'll trust on you"; mes "So.. what are you waiting for?"; close; OnInit: delwaitingroom; waitingroom "Sample",0; end; } That NPC tell me about the quest and bring the item only if i dont have the item if i've the item he told me something different, delete the item and set me as "QVS", then i talk with him a 3rd time and he just Teleport me to the map the npc is working like i want....what i want on the NPC is something similar like this... if i dont have the item, he jusy something like "hello" and then he close, if i've the "QVS" he show me the npc i mean the quest shop, doesnt matters if i've the items for the quest, if i dont have the quest that set me "QVS" he just gonna show the "hello" that's what i want :/ PD: sorry for delay to answer..
  19. ok i dont understand the first part i just didnt removed anything i just added some scripts at the begining and at the end without removing any // or "" and yeah my problem is that i dont know the structure ok i gonna try re edit and update hmm Ok now i understand a bit more yeah i dont have a npc, because what i want is, if that NPC have that item, the npc deleted and then "set" that he completed the quest, but if he already completed the quest, now the npc will show him as the quest shop, thats what i want... but i dont know how really do it :/ i know the basics i mean the if count and everything but... i dont know the structure :s i mean what's first, then this, then this, finally...
  20. Hi rAthena Community, i've a question about that Quest Shop is working and everything but i need add a "restriction" i mean only if already completed a quest can use the quest if not, only display something about "good afternoon" or something like that, i already tried do it by myself but didnt work xD i guess my problem is the structure... anyway here the script i tried (some messages at on spanish... im from mexico after all...) Thx for read, i really need a response about this i know this should be kinda easy.... but i dont know the correct structure >< prontera,164,168,3 script Quest NPC 997,{ if (IDAN == 1) { { callfunc "qshop202"; } // Script Core //============================================================ - script quest_shop202 -1,{ function Add; function Chk; function Slot; function A_An; OnInit: freeloop(1); // ----------------------------------------------------------- // Basic shop settings. // ----------------------------------------------------------- set .Announce,0; // Announce quest completion? (1: yes / 0: no) set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never) set .ShowID,0; // Show item IDs? (1: yes / 0: no) set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no) set .MaxStack,100; // Max number of quest items purchased at one time. // ----------------------------------------------------------- // Points variable -- optional quest requirement. // setarray .Points$[0],"<variable name>","<display name>"; // ----------------------------------------------------------- setarray .Points$[0],"CUSPOINTS","Custom Points"; // ----------------------------------------------------------- // Shop IDs -- to add shops, copy dummy data at bottom of file. // setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...}; // ----------------------------------------------------------- setarray .Shops$[1],"Weapons","Equipment","Etc"; // ----------------------------------------------------------- // Quest items -- do NOT use a reward item more than once! // Add(<shop ID>,<reward ID>,<reward amount>, // <Zeny cost>,<point cost>, // <required item ID>,<required item amount>{,...}); // ----------------------------------------------------------- Add(1,16028,1,0,1000,6470,50,4368,10,671,10); Add(1,28100,1,0,1000,6470,50,4368,10,671,10); Add(1,18119,1,0,1000,6470,50,4368,10,671,10); Add(1,13093,1,0,1000,6470,50,4368,10,671,10); Add(1,21009,1,0,1000,6470,50,4368,10,671,10); Add(1,28000,1,0,1000,6470,50,4368,10,671,10); Add(1,1836,1,0,1000,6470,50,4368,10,671,10); Add(1,1438,1,0,1000,6470,50,4368,10,671,10); Add(1,1669,1,0,1000,6470,50,4368,10,671,10); Add(1,13441,1,0,1000,6470,50,4368,10,671,10); Add(1,1496,1,0,1000,6470,50,4368,10,671,10); Add(1,2023,1,0,1000,6470,50,4368,10,671,10); Add(1,1933,1,0,1000,6470,50,4368,10,671,10); Add(1,1988,1,0,1000,6470,50,4368,10,671,10); Add(2,15090,1,0,1000,6470,50,4368,10,671,10); Add(2,22033,1,0,1000,6470,50,4368,10,671,10); Add(2,18820,1,0,1000,6470,50,4368,10,671,10); Add(2,20721,1,0,1000,6470,50,4368,10,671,10); Add(2,15091,1,0,1000,6470,50,4368,10,671,10); Add(2,6672,1,0,1000,6470,50,4368,10,671,10); Add(2,2187,1,0,1000,6470,50,4368,10,671,10); Add(3,7421,1,0,100); Add(3,7422,1,0,200); Add(3,7423,1,0,300); // ----------------------------------------------------------- freeloop(0); set .menu$,""; for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) { set .menu$, .menu$+.Shops$[.@i]+":"; npcshopdelitem "qshop202"+.@i,909; } end; OnMenu: set .@size, getarraysize(@i); if (!.@size) set .@i, select(.menu$); else if (.@size == 1) set .@i, @i[0]; else { for(set .@j,0; .@j<.@size; set .@j,.@j+1) set .@menu$, .@menu$+.Shops$[@i[.@j]]+":"; set .@i, @i[select(.@menu$)-1]; } deletearray @i[0],getarraysize(@i); if (.Shops$[.@i] == "") { message strcharinfo(0),"An error has occurred."; end; } dispbottom "Select one item at a time."; callshop "qshop202"+.@i,1; npcshopattach "qshop202"+.@i; end; OnBuyItem: // .@q[] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... } setarray .@q[0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]); copyarray .@q[3],getd(".q_"+.@q[0]+"[0]"),getarraysize(getd(".q_"+.@q[0])); set .@q[2],.@q[1]*.@q[3]; if (!.@q[2] || .@q[2] > 30000) { message strcharinfo(0),"You can't purchase that many "+getitemname(.@q[0])+"."; end; } mes "[Quest Shop]"; mes "Reward: ^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"")+Slot(.@q[0])+"^000000"; mes "Requirements:"; if (.@q[4]) mes " > "+Chk(Zeny,.@q[4]*.@q[1])+(.@q[4]*.@q[1])+" Zeny^000000"; if (.@q[5]) mes " > "+Chk(getd(.Points$[0]),.@q[5]*.@q[1])+(.@q[5]*.@q[1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+(.@q[5]*.@q[1])+")^000000"; if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000"; next; setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11); if (((@qe[1] & 1) || (@qe[1] & 256) || (@qe[1] & 512)) && @qe[2] > 0) set .@preview,1; addtimer 1000, strnpcinfo(0)+"::OnEnd"; while(1) { switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[6])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) { case 1: if (@qe[0]) { mes "[Quest Shop]"; mes "You're missing one or more quest requirements."; close; } if (!checkweight(.@q[0],.@q[2])) { mes "[Quest Shop]"; mes "^FF0000You need "+(((.@q[2]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000"; close; } if (.@q[4]) set Zeny, Zeny-(.@q[4]*.@q[1]); if (.@q[5]) setd .Points$[0], getd(.Points$[0])-(.@q[5]*.@q[1]); if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) delitem .@q[.@i],.@q[.@i+1]*.@q[1]; getitem .@q[0],.@q[2]; if (.Announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):A_An(getitemname(.@q[0])))+"!",0; specialeffect2 699; close; case 2: setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), 1; if (@qe[1] & 1) changelook LOOK_HEAD_BOTTOM, @qe[2]; if (@qe[1] & 256) changelook LOOK_HEAD_TOP, @qe[2]; if (@qe[1] & 512) changelook LOOK_HEAD_MID, @qe[2]; break; case 3: close; } } OnEnd: if (@qe[6]) { changelook LOOK_HEAD_BOTTOM, @qe[3]; changelook LOOK_HEAD_TOP, @qe[4]; changelook LOOK_HEAD_MID, @qe[5]; } deletearray @qe[0],7; end; function Add { if (getitemname(getarg(1)) == "null") { debugmes "Quest reward #"+getarg(1)+" invalid (skipped)."; return; } setarray .@j[0],getarg(2),getarg(3),getarg(4); for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) { if (getitemname(getarg(.@i)) == "null") { debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped)."; return; } else setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1); } copyarray getd(".q_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j); npcshopadditem "qshop202"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0); return; } function Chk { if (getarg(0) < getarg(1)) { set @qe[0],1; return "^FF0000"; } else return "^00FF00"; } function Slot { set .@s$,getitemname(getarg(0)); switch(.ShowSlot) { case 1: if (!getitemslots(getarg(0))) return .@s$; case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]"; default: return .@s$; } } function A_An { setarray .@A$[0],"a","e","i","o","u"; set .@B$, "_"+getarg(0); for(set .@i,0; .@i<5; set .@i,.@i+1) if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0); return "a "+getarg(0); } } function script qshop201 { deletearray @i[0],getarraysize(@i); for(set .@i,0; .@i<getargcount(); set .@i,.@i+1) set @i[.@i],getarg(.@i); doevent "quest_shop202::OnMenu"; end; } } if ( countitem(7421) == 1 ) { mes "[Quest NPC]"; mes "Asi que quieres accender...."; mes "Ok, tomare esa medalla y seras promovido inmediatamente"; mes "Ok Bienvenido [Novato]"; set IDAN,1; delitem 7421,1; end;} // Dummy shop data -- copy as needed. //============================================================ - shop qshop2021 -1,909:-1 - shop qshop2022 -1,909:-1 - shop qshop2023 -1,909:-1 - shop qshop2024 -1,909:-1 - shop qshop2025 -1,909:-1 on the image is the error i got...
  21. Hi rAthena Community, i've this script...is working fine without troubles but i want something like... "change 2 cards to 1 point" also if there's a way to use multi items i mean... 1 lunatic + 1 poring or 1 poring + 1 ant egg or... 1 lunatic + ... any kind of the listed cards = 1 point, or 2 poring = 1 point, well is only that... what can i do? plz ^^ //===== rAthena Script ======================================= //= Card Trader //===== By: ================================================== //= Elias (og2) //===== Current Version: ===================================== //= 1.4 //===== Compatible With: ===================================== //= rAthena Project; SVN r15340+ //===== Description: ========================================= //= Card and Points Trader //===== Additional Comments: ================================= //= 1.0 Translated from the Official [Elias] //= 1.1 Fixed variables and optimized script [Elias] //= 1.2 Fixed char being stuck with breaks [Elias] (bugreport:5374) //= 1.3 Optimized: reduced from 123kb to 7kb! [Euphy] //= 1.4 Variables don't need to load OnInit. [Euphy] //= 1.4a Misc. [Capuche] //============================================================ prontera,115,90,0 script Putty 4_F_01,{ setarray .@card1[0], 4001,4006,4009,4019,4075,4033,4012,4016,4026,4022, 4027,4028,4038,4025,4021,4050,4079,4081,4090,4094, 4101,4104,4110,4114,4119,4108,4095,4231,4280,4008, 4011,4013,4014,4015,4020,4032,4037,4039,4041,4045, 4046,4010,4023,4029,4052,4048,4056,4071,4093,4031, 4036,4034,4042,4055,4061,4087,4096,4116,4122,4170, 4215,4220,4228,4226,4212,4227,4267,4257,4278,4286, 4287,4292,4311,4315,4319,4322,4084,4078,4113,4149, 4153,4196,4240,4247,4256,4057,4066,4067,4112,4150, 4152,4186,4187,4181,4173,4167,4162,4176,4195,4193, 4200,4223,4194,4190,4189,4192,4224,4244,4248,4261, 4260,4259,4274,4275,4313,4299,4304,4294,4076,4127, 4154,4157,4156,4213,4214,4225,4235; setarray .@card2[0], 4293,4297,4288,4283,4295,4307,4308,4309,4132,4326, 4341,4335,4337,4345,4344,4331,4333,4332,4089,4161, 4177,4178,4180,4184,4191,4206,4199,4273,4282,4268, 4289,4321,4316,4343,4339,4369,4377,4385,4383,4382, 4380,4381,4378,4379,4390,4389,4388,4391,4405,4400, 4401,4402,4404,4002,4003,4004,4005,4007,4017,4024, 4030,4035,4040,4043,4044,4049,4051,4053,4058,4060, 4062,4063,4064,4065,4068,4069,4070,4072,4073,4074, 4077,4080,4082,4083,4085,4086,4088,4091,4092,4097, 4098,4099,4100,4102,4103,4106,4107,4109,4111,4115, 4117,4118,4120,4124,4125,4126,4138,4139,4141,4151, 4158,4164,4165,4182,4185,4159,4160,4166,4172,4175, 4188,4201,4202,4204,4205,4208,4209; setarray .@card3[0], 4120,4216,4217,4219,4221,4222,4230,4234,4233,4232, 4237,4238,4242,4243,4245,4246,4249,4252,4255,4258, 4262,4264,4276,4270,4271,4218,4239,4251,4253,4269, 4334,4105,4133,4136,4229,4272,4277,4279,4281,4284, 4285,4290,4296,4298,4301,4310,4314,4317,4325,4327, 4328,4329,4338,4340,4346,4347,4348,4349,4350,4351, 4353,4354,4355,4356,4358,4360,4362,4364,4366,4368, 4370,4371,4373,4375,4387,4406,4129,4155,4291,4392, 4393,4394,4409,4410,4411,4412,4413,4414,4415,4416, 4417,4418,4420,4421,4422,4423,4424,4427,4427,4428, 4429,4431,4432,4433,4434,4435,4436,4437,4438,4439, 4440,4442,4443,4444,4445,4447,4448,4449,4450,4452, 4453; setarray .@size_card[1], getarraysize(.@card1), getarraysize(.@card2), getarraysize(.@card3); .@points = oversea_event9; if (!.@points) { mes "[Putty]"; mes "Hi there."; mes "I don't know if I can be"; mes "of any assistance, but I"; mes "am trying to help older veterans"; mes "by exchaning the cards that"; mes "they are no longer using."; next; switch(select("Ask for more information!","I don't have any cards right now.")) { case 1: mes "[Putty]"; mes "I am giving 1 point for each card that you bring me."; mes "The points can be used to exchange for items that I have."; next; mes "[Putty]"; mes "For ^CC0000100 points^000000: ^0000CC1 Old Card Album^000000."; mes "For ^CC000050 points^000000: ^0000CC20 Yggdrasil Berry^000000."; mes "For ^CC000020 points^000000: ^0000CC10 Blue Potion^000000."; mes "For ^CC00001 point^000000: ^0000CC4 Honey^000000."; next; break; case 2: mes "[Putty]"; mes "Well, remember this offer!"; close; } } else { mes "[Putty]"; mes "Welcome back!"; mes "I see you already have some"; mes "trading points. Actually, you currently have ^00cc00" + .@points + "^000000."; next; mes "[Putty]"; mes "Would you like to exchange these"; mes "points now, or you would like to exchange more cards?"; next; } switch(select("I would like to exchange cards.","Can I exchange the points?")) { case 1: mes "[Putty]"; mes "Please tell me what card you want to exchange."; next; input .@i$; .@input$ = "_"+.@i$; freeloop(1); for(.@j = 1; .@j<4; .@j++) { for(.@i = 0; .@i<.@size_card[.@j]; .@i++) if (compare(.@input$,"_"+getitemname(getd(".@card"+.@j+"["+.@i+"]")))) { .@card = getd(".@card"+.@j+"["+.@i+"]"); break; } sleep2 10; // For good measure if (.@card) break; } freeloop(0); mes "[Putty]"; if (!.@card) mes "Please, come back here if you want to exchange a monster card."; else { .@count = countitem(.@card); if (!.@count) { mes "You don't have any ^0055FF"+callfunc("F_GetPlural",getitemname(.@card))+"^000000 with you!"; close; } mes "You've got ^0055FF"+callfunc("F_InsertPlural",.@count,getitemname(.@card))+"^000000."; mes " "; mes "Would you like to exchange 1 point for each of them?"; next; switch(select("Yes, please!","No, thank you.")) { case 1: delitem .@card,.@count; oversea_event9 = (.@points+.@count); mes "[Putty]"; mes "Alright, you have received ^CC0000"+.@count+"^000000 points."; break; case 2: mes "[Putty]"; mes "Okay, let me know if I can help you with something else."; break; } } close; case 2: if (.@points) { mes "[Putty]"; mes "These are the items that I have."; next; switch(select("1 Old Card Album - 50 Points","20 Yggdrasil Berry - 50 Points","10 Blue Potion - 20 Points","4 Honey - 1 Point","^777777Nerver mind.^000000")) { case 1: if (.@points < 100) break; mes "[Putty]"; mes "Great, I wish you the best"; mes "of luck with this album. I have a"; mes "very good feeling about this one!"; oversea_event9 = .@points - 100; getitem 616,1; close; case 2: if (.@points < 50) break; mes "[Putty]"; mes "Oh, you must like adventures."; mes "Here you go, just what you need!"; oversea_event9 = .@points - 50; getitem 607,20; close; case 3: if (.@points < 20) break; mes "[Putty]"; mes "Blue Potions? Are you sure?"; mes "If that's what you want, here they are!"; oversea_event9 = .@points - 20; getitem 505,10; close; case 4: if (.@points < 1) break; mes "[Putty]"; mes "It took many bees"; mes "to make all of this."; mes "Make good use of it."; oversea_event9 = .@points - 1; getitem 518,4; close; case 5: mes "[Putty]"; mes "Alright, come back when you have more points."; close; } mes "[Putty]"; mes "Sorry, but you don't have enough points."; close; } else { mes "[Putty]"; mes "You have 0 points. You need at least 1 point to exchange."; close; } } } https://github.com/rathena/rathena/blob/master/npc/other/card_trader.txt
  22. And... How did you solved it? ^^ same problem... thx ^^
  23. i saw on another page the old "divinero" that on eathena was possible so i think "with time would be possible" but i tried edit as i saw on that post on "divinero" (now http://foro.101level.com/) but didnt work :/ for that reason i think could be possible well i gonna still waiting for a explanation about why not possible at least >< is on spanish: http://foro.101level.com/eathena-guias-y-faqs/(guia)-ocultar-gms-en-pvp/ Bump c:
×
×
  • Create New...