Garr
Members-
Content Count
482 -
Joined
-
Last visited
-
Days Won
8
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Garr
-
Yes, NPC variables are not stored for long-keeping, so they are reset on reload. You'll be better off using $variables. Those do get saved inside SQL (mapreg table). Also, you do know that int variables have cap at INT_MAX(2,147,483,647) ? With zeny donations, high enough rates and enough time, you can hit that limit. Just a fair warning.
-
Walking & talking Angeling that Heals & Buffs people in Town.
Garr replied to Kiel's question in General Server Support
Maybe this will work? But haven't checked, iono if it works in latest rev. -
Aww, and I so wanted to see the scripting involved behind it for the sake of learning D: Oh well, at least I'll know it's out there somewhere~
-
Because ternary is an operator, and should be outside quotes :3 .@selectbuff = select("^777777Return^000000:" +(@agicolor?"^cc0000":"^cc0000") + "Increase Agility^000000:" +(@blessingcolor?"^cc0000":"^cc0000") + "Blessing^000000");
-
mes (@color?"^00ff00":"^ff0000") + "This text will change color depending if @color is set!^000000";
-
You can try using addrid plugin, and then even normal warp command will do
-
Did you copy the new needed lua files into data folder/grf? If not, they are in support folder of NEMO, you need to copy them using the same path.
-
@@Daifuku You know, your art is really awesome, and don't let anyone tell you otherwise. I must say, I always was a bit jealous of other people drawing talents as my own are fairly limited. Anyway, you already made a huge step actually going out and posting, so good job /no1 Get well soon.
-
Iirc if you put tabs inside function declaration it'd try to read it as an NPC declaration, so just space them out and try. I use functions that way for a while, makes it easier to change and maintain.
-
You don't have their IDs attached to sprites in npcidentity.lua(lub)/jobname.lua(lub). Check out adding custom mob.
-
Try npc/quests/quests_veins.txt, look for Chada.
-
Oh. I had no idea. Fixed in my initial post then.
-
Hmm? And which mastery? If it's mystical one, then try to comment this line bonus bEquipmentMatk,1+MysticalMaster+((1+MysticalMaster)*readparam(bInt)/100); I'd guess it requres a custom patch to add only to equipment matk.
-
Fixed code in my post above
-
Several case issues (Break vs break), added callfunc,fixed SC_ name, replaced all set with direct assignment, made NPC's sprite use constant. I think that's pretty much it.
-
Hmm. Here, try this, at least Haru's script checker doesn't see any more errors: //===== EinherjarRO Scripts ================================== //= WeaponMasteries //===== By: ================================================== //= Stolao //===== Current Version: ===================================== //= 1.22 //===== Compatible With: ===================================== //= rAthena SVN & Hercules 844d4291 //===== Description: ========================================= //= As you train using a particular weapon type you get passive //= buffs depending on how much yo have used that type //= There are five types Slash, Stab, Smash, Ranged and Unique //===== Comments: ============================================ //= Masteries can go up to level 9999 with curve of 21 //= Requires OnEvent/OnKillNPCEvent.txt to function //===== Additional Comments: ================================= //= 1.00 Original Make //= 1.01 +33% Mastery >> Atk //= 1.02 +50% Mastery >> Matk //= 1.03 Rename Masteries //= 1.04 Redistibute Weapons into new masteries //= 1.05 Wiped Mastery Bonuses //= 1.06 Added Starting Bonuses //= 1.07 Made OnPCStatCalcEvent for Mastery System //= 1.08 Added mastery Bonueses for Lvl 1, 2, 4, 8, 16, 32 ,64, and 128 //= 1.09 Changed Mysticals MaxSPRate for MaxSp //= 1.0A Added @wi (see bindatcmd.txt) //= 1.0B Added @wlvl (see bindatcmd.txt) //= 1.0C Removed dependency from bindatcmd.txt //= 1.0D Rebalanced a few formulas for differant masteries //= 1.0E Combined with old Sect System //= 1.0F Added Sect give +10 total on varried stats //= 1.10 Added 10% Resistance to sects Element //= 1.11 Added 10% more damage with sects element //= 1.12 Changed Sect Stats from +10 -> +3 //= 1.13 Changed Wm Stat bonus from M/9 -> M/32 //= 1.14 Removed Wm Booster item //= 1.15 Lowered Wm Max Level to 99 //= 1.16 Rewrote Onslaught Formulas for lower effect //= 1.17 Rewrote Switfness Formulas for lower effect //= 1.18 Rewrote Safegaurd Formulas for lower effect //= 1.19 Rewrote Ranged Formulas for lower effect //= 1.1A Rewrote Mystical Formulas for lower effect //= 1.1B Added Exprates = job_exp_rate //= 1.1C Changed Exp Curve to reflect new Exp Rates //= 1.1D Added Debugmes on Overflow //= 1.1E Added Increased Exp from SC_JEXPBOOST,2 //= 1.1F Fixed Spacing/ Readability in OnInit //= 1.20 Fixed Typos //= 1.21 Fixed Bug with No gear On //= 1.22 Fixed Missing ) //===== Contact Ifo: ========================================= //= [Stolao] //= Email: [email protected] //============================================================ // // Str - Onslaught: 2HSword,1HAxe,2HAxe,1HMace,2HMace(unused),Knuckle // Agi - Swiftness: Specialty,Dagger,Fuuma Shuriken,Katar // Vit - Safegaurd: Unarmmed,1HSword,1HSpear,2HSpear // Dex - Ranged: Bow,Instrument,Whip,Revolver,Rifle,Gatling Gun,Shotgun,Grenade Launcher // Int - Mystical: Rod,Book,2HStaff,Scythe function script Onslaught_M { if ( OnslaughtMaster >= 1 ) bonus bCritical,1+OnslaughtMaster/20; if ( OnslaughtMaster >= 2 ) bonus bAtk,1+OnslaughtMaster/4; if ( OnslaughtMaster >= 4 ) bonus bAtk2,1+OnslaughtMaster/4; if ( OnslaughtMaster >= 8 ) bonus bPerfectHitAddRate,1+OnslaughtMaster/21; if ( OnslaughtMaster >= 16 ) bonus bBaseAtk,OnslaughtMaster/4+1; if ( OnslaughtMaster >= 32 ) bonus bCritAtkRate,OnslaughtMaster/4+1; if ( OnslaughtMaster >= 64 ) bonus bAspdRate,OnslaughtMaster/22 + 1; if ( OnslaughtMaster >= 128 ) bonus bSplashAddRange,1; bonus bStr,1+OnslaughtMaster/32; bonus bAtkRate,1+OnslaughtMaster/7+((1+OnslaughtMaster/7)*readparam(bStr)/100); return; } function script Swiftness_M { if ( SwiftnessMaster >= 1 ) bonus bSpeedAddRate,1+SwiftnessMaster/9; if ( SwiftnessMaster >= 2 ) bonus bFlee,SwiftnessMaster/3; if ( SwiftnessMaster >= 4 ) bonus bDoubleAddRate,1+SwiftnessMaster/9; if ( SwiftnessMaster >= 8 ) bonus bFlee2,1+SwiftnessMaster/33; if ( SwiftnessMaster >= 16 ) bonus bPerfectHitAddRate,1+SwiftnessMaster/11; if ( SwiftnessMaster >= 32 ) bonus bCritAtkRate,SwiftnessMaster/9-1; if ( SwiftnessMaster >= 64 ) bonus bCritical,1+OnslaughtMaster/20; if ( SwiftnessMaster >= 128 ) bonus2 bHPDrainRate,1+SwiftnessMaster,1+SwiftnessMaster/24; bonus bAgi,1+SwiftnessMaster/32; bonus bAspdRate,1+SwiftnessMaster/7+((1+SwiftnessMaster/7)*readparam(bAgi)/100); return; } function script Safegaurd_M { if ( SafegaurdMaster >= 1 ) bonus bHPrecovRate,1+SafegaurdMaster/2; if ( SafegaurdMaster >= 2 ) bonus bDef,1+SafegaurdMaster/20; if ( SafegaurdMaster >= 4 ) bonus bMdef,1+SafegaurdMaster/24; if ( SafegaurdMaster >= 8 ) bonus bMaxHPrate,1+SafegaurdMaster/11; if ( SafegaurdMaster >= 16 ) bonus bNearAtkDef,SafegaurdMaster/20+1; if ( SafegaurdMaster >= 32 ) bonus bLongAtkDef,SafegaurdMaster/21+1; if ( SafegaurdMaster >= 64 ) bonus bMagicAtkDef,SafegaurdMaster/22+1; if ( SafegaurdMaster >= 128 ) bonus bCriticalDef,SafegaurdMaster/23+1; bonus bVit,1+SafegaurdMaster/32; bonus bMaxHP,SafegaurdMaster*5+5+((SafegaurdMaster*5+5)*readparam(bVit)/100); return; } function script Ranged_M { if ( RangedMaster >= 1 ) bonus bBaseAtk,OnslaughtMaster/3+2; if ( RangedMaster >= 2 ) bonus bCritical,1+RangedMaster/21; if ( RangedMaster >= 4 ) bonus bFlee,1+RangedMaster/11; if ( RangedMaster >= 8 ) bonus bAspd,RangedMaster/11; if ( RangedMaster >= 16 ) bonus bHit,RangedMaster/9; if ( RangedMaster >= 32 ) bonus bLongAtkRate,RangedMaster/9-1; if ( RangedMaster >= 64 ) bonus bCritAtkRate,4+RangedMaster/9; if ( RangedMaster >= 128 ) bonus bAtkRange,1+RangedMaster/99; bonus bDex,1+RangedMaster/32; bonus bAtkRate,1+RangedMaster/7+((1+RangedMaster/7)*readparam(bDex)/100); return; } function script Mystical_M { if ( MysticalMaster >= 1 ) bonus bSPrecovRate,1+MysticalMaster/2; if ( MysticalMaster >= 2 ) bonus bMaxSP,MysticalMaster*2+2; if ( MysticalMaster >= 4 ) bonus bCastrate,-1-MysticalMaster/20; if ( MysticalMaster >= 8 ) bonus bUseSPrate,-1-MysticalMaster/21; if ( MysticalMaster >= 16 ) bonus bDelayrate,-1-MysticalMaster/22; if ( MysticalMaster >= 32 ) bonus bHealPower,1+MysticalMaster/2; if ( MysticalMaster >= 64 ) bonus bMatkRate,1+MysticalMaster/7; if ( MysticalMaster >= 128 ) bonus bNoCastCancel,1; bonus bInt,1+MysticalMaster/32; bonus bMatk,1+MysticalMaster+((1+MysticalMaster)*readparam(bInt)/100); return; } prontera,5,5,5 script PCSTATCALC FAKE_NPC,{ end; OnWeaponInfo: .@M$ = .@atcmd_parameters$[0]; if ( .@M$ == "" ) { if ( getequipid(EQI_HAND_R) ) { .@ei = getiteminfo(getequipid(EQI_HAND_R),11); } else { .@ei = -1; } switch(.@ei) { case 3: case 6: case 7: case 8: case 9: case 12: .@M$ = "Onslaught"; break; case 0: case 1: case 16: case 22: .@M$ = "Swiftness"; break; case 2: case 4: case 5: case -1: .@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 ( strtolower(.@M$) == "onslaught" ) .@i = 1; if ( strtolower(.@M$) == "swiftness" ) .@i = 2; if ( strtolower(.@M$) == "safegaurd" ) .@i = 3; if ( strtolower(.@M$) == "ranged" ) .@i = 4; if ( strtolower(.@M$) == "mystical" ) .@i = 5; .@X = atoi(.@atcmd_parameters$[1]); if ( !.@X ) .@X = getd(""+.@M$+"Master"); switch(.@i) { case 1: dispbottom "Onslaught Lv: "+.@X+" "+OnslaughtExp+" / "+((OnslaughtMaster*OnslaughtMaster*25)+10+OnslaughtMaster)+"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+" / "+((SwiftnessMaster*SwiftnessMaster*25)+10+SwiftnessMaster)+"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 ""+(1+SwiftnessMaster)/10+"."+((1+SwiftnessMaster)%10)+"% chance of healing for "+(.@X/24+1)+"% of damage dealt with each normal attack"; if ( .@X >= 64 )dispbottom "Critical Chance +"+(1+.@X/20)+""; if ( .@X >= 128 )dispbottom "Crit Damage +"+(.@X/9-1)+"%"; break; case 3: dispbottom "Safegaurd Lv: "+.@X+" "+SafegaurdExp+" / "+((SafegaurdMaster*SafegaurdMaster*25)+10+SafegaurdMaster)+"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+" / "+((RangedMaster*RangedMaster*25)+10+RangedMaster)+"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+" / "+((MysticalMaster*MysticalMaster*25)+10+MysticalMaster)+"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 = .@i+1; } } 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: switch(getiteminfo(getequipid(EQI_HAND_R),11)){ case 3: case 6: case 7: case 8: case 9: case 12: callfunc("Onslaught_M"); break; case 0: case 1: case 16: case 22: callfunc("Swiftness_M"); break; case 2: case 4: case 5: case -1: callfunc("Safegaurd_M"); break; case 11: case 13: case 14: case 17: case 18: case 19: case 20: case 21: callfunc("Ranged_M"); break; case 10: case 15: case 23: case 24: callfunc("Mystical_M"); break; } end; OnNPCKillEvent: if ( .Weapon){ .@M$ = ""; switch(getiteminfo(getequipid(EQI_HAND_R),11)){ case 3: case 6: case 7: case 8: case 9: case 12: .@M$ = "Onslaught"; break; case 0: case 1: case 16: case 22: .@M$ = "Swiftness"; break; case 2: case 4: case 5: case -1: .@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 ( .MaxMastery > getd( .@M$ + "Master")) { setd .@M$+"Exp",getd(""+.@M$+"Exp") + (strmobinfo(3,killedrid)+.wLvBonus*getiteminfo(getequipid(EQI_HAND_R),13)) * (getbattleflag("job_exp_rate") + getbattleflag("job_exp_rate") * getstatus(SC_CASH_PLUSONLYJOBEXP,2)); if ( getd(""+.@M$+"Exp") > getd(""+.@M$+"Master")*(getd(""+.@M$+"Master")*.expcurve)+10+getd(""+.@M$+"Master")){ setd ""+.@M$+"Master",getd(""+.@M$+"Master")+1; announce ""+.@M$+" Mastery has advanced to Lv "+getd(""+.@M$+"Master")+"!",bc_blue|bc_self; setd ""+.@M$+"Exp",0; } } } end; OnInit: bindatcmd("wi" ,"PCSTATCALC::OnWeaponInfo",1,99); bindatcmd("weaponinfo" ,"PCSTATCALC::OnWeaponInfo",1,99); bindatcmd("wlvlup" ,"PCSTATCALC::OnWeaponLevel",60,99); bindatcmd("wlvl" ,"PCSTATCALC::OnWeaponLevel",60,99); .Weapon = 1; // Toggle Exp Groth On/Off // 1 = On // 0 = Off .expcurve = 2500; // Exp curve for weapon mastery // Lv*Lv*.expcurve+10+Lv // Default 2500 .MaxMastery = 99; // Sets the max Weapon Mastery Level // Default 128 .wLvBonus = 1; // Amount of extra Weapon Exp from higher level weapons, // Bonus exp = WLv*.wLvBonus // Default 1 // System Debug if ( .MaxMastery * .MaxMastery *(.expcurve/10) + .MaxMastery + 10 > 214748364 ){ debugmes "[Weapon Mastery]: Max Exp Overflow Error, Lower .MaxMastery or .expcurve to fix"; end; } } Note: You'd need a custom plugin from AnnieRuru, OnPCStatCalcEvent.
-
if( instance_attachmap("amatsu", .@instance, 1, "amatsu2") == "" ) { This line is your problem. If you use <new map name> ("amatsu2" in that case), the map will *always* be called that, so you need to either generate unique name each call, or leave it out if( instance_attachmap("amatsu", .@instance, 1) == "" ) { ETA: Also, never warp exactly to map unless you'll know resulting name, it's better to use instance_mapname. warp instance_mapname("amatsu"), 198, 90;
-
Umm... so actually you're asking if instances can do the single thing they were created for? Yes, one NPC can create as many instances at once as possible, be it solo or party. The only hard limit on instances iirc is that their *total* amount must not exceed 1000 at once. Generally check out npc/instances folder.
-
Close, but not quite acc_reg_num_db
-
Kafra storage password is saved inside '#kafra_code' variable, you can check it ingame on GM character using: #set <Player Name> #kafra_code
-
Hercules *had* checkre command, now it's just replaced with RENEWAL constant. So this (checkre(0))? becomes this (RENEWAL)?
-
It's not BaseExp you need, but ModExp.
- 4 replies
-
- experience
- level
-
(and 2 more)
Tagged with:
-
I don't think there's a script command with such capabilities yet, but a plugin can be made to add one It'd pretty much just be using guild->getposition.
-
Check the map with browedit, maybe it doesn't have gat tiles updated. ETA: Maybe use WeeMapCache to edit mapcache.dat? It's easier that way.