Garr
Members-
Content Count
482 -
Joined
-
Last visited
-
Days Won
8
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Garr
-
I think that's because in each of the cases you check player's whose HP/SP changed for the variable, when you're supposed to check it for whoever you're sending info to. I assume @showsp switches "displaypartysp" variable 1/0? ETA: Just a suggestion, wouldn't it be way easier to just alter sd's hp to sp if that variable is present during clif_party_hp/clif_hpmeter_single/clif_hpmeter_sub?
-
where can I find the vit = max HP calculation/formula
Garr replied to Svanhild's question in Source Support
status.c unsigned int status_base_pc_maxhp(struct map_session_data *sd, struct status_data *st) {... val += val * st->vit/100; // +1% per each point of VIT...} -
Use *attachrid to attach needed player, and then just add his variable into scope. OnPcDieEvent:set .@id, getcharid(3);.@variable1 = NeededCharVariable;attachrid(killerrid);.@variable2 = NeededCharVariable;if (.@variable1 > .@variable2)...
-
Nope.
-
Yes, it makes difference. Use 586th Revision to resave maps. I prefer to use 620th revision to work on map, but then always(!) resave it using 586th revision. It'll deal with a.) tiles problem b.) invisible/partly missing objects.
-
Yes, the answer for this is to save it in Browedit Rev. 586. If this doesn't help, you might need to rearrange map so nothing in it goes below 0 height. rAthena topic with same problem.
-
Because it's not SC_SPIRIT, it's SC_SOULLINK. prontera,156,165,5 script Buff & Link 100,{emotion 47; set .@Price,0; // Zeny requerido. set .@Buffs,1; // Buffar os jogadores? (1: sim / 0: não) set .@Delay,5; // Tempo de espera, em segundos ( Padrão 5 segundos ) set .@level,1; // Level de Player VIP set .@time, 300000; // Duração do Buff Soul Link ( Padrão 5 minutos ) // Padrão VIP ---------------------------------------------------- if (getgroupid() >= .@level) { atcommand "@repairall"; callfunc "F_ClearGarbage",0; if (@HD > gettimetick(2)) end; if (.@Price) { message strcharinfo(0),"Custo: "+.@Price+" Zeny."; if (Zeny < .@Price) end; if(select("^0055FFCurar^000000:^777777Sair^000000") == 2) close; set Zeny, Zeny-.@Price; } specialeffect2 313; percentheal 100,100; if (.@Buffs) { specialeffect2 EF_INCAGILITY; sc_start SC_INC_AGI,240000,10; specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10; // Soul Linker -------------------------------------------------- switch ( BaseJob ) { case 18: set .@spirit, 445; break; case 15: set .@spirit, 447; break; case 4047: set .@spirit, 448; break; case 16: set .@spirit, 449; break; case 14: set .@spirit, 450; break; case 23: set .@spirit, 451; break; case 7: set .@spirit, 452; break; case 9: set .@spirit, 453; break; case 8: set .@spirit, 454; break; case 19: case 20: set .@spirit, 455; break; case 17: set .@spirit, 456; break; case 10: set .@spirit, 458; break; case 11: set .@spirit, 460; break; } if ( .@spirit ) { sc_start2 SC_SOULLINK, .@time, 5, .@spirit; skilleffect .@spirit, 5; } if (.@Delay) set @HD, gettimetick(2)+.@Delay; end; } } else { atcommand "@repairall"; callfunc "F_ClearGarbage",0; if (@HD > gettimetick(2)) end; if (.@Price) { message strcharinfo(0),"Custo: "+.@Price+" Zeny."; if (Zeny < .@Price) end; if(select("^0055FFCurar^000000:^777777Sair^000000") == 2) close; set Zeny, Zeny-.@Price; } specialeffect2 313; percentheal 100,100; if (.@Buffs) { specialeffect2 EF_INCAGILITY; sc_start SC_INC_AGI,240000,10; specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10; } if (.@Delay) set @HD, gettimetick(2)+.@Delay; end; }}
-
in-game item_db function. Is this possible to add?
Garr replied to Helena's question in Script Support
Yeah, my bad, I completely forgot that it's not part of sql query ^^' Also, for now this will only show @whodrops for first item in the list. I'm not sure how you'd like to deal with it, to show chosen item? (Make it like next/previous menu along with whodrops option) Or leave as is, where it shows only first item found? [Edited code in my first post with your fix] -
in-game item_db function. Is this possible to add?
Garr replied to Helena's question in Script Support
I think something like this: L_Item: next; dispbottom "Initiating Item Database..."; progressbar "0xRRGGBB",2; mes "Database successfully loaded. What Item do you want to learn about?:"; mes " "; mes "Please ^ff0000only input the Item's full name^000000 or there will be incorrect results!"; input .@itemname$; .@amount = query_sql ("SELECT ID, price_buy, price_sell, weight, atk, defence, slots FROM item_db WHERE name_japanese = '"+ escape_sql(.@itemname$) +"'", @iid$, .@buy, .@sell, .@weight, .@atk, .@defence, .@slots); if (.@amount == 0) { //No items found mes "There's no such item."; next; menu "Search for another item",L_Item,"Exit",L_later2; } for (.@i = 0; .@i < .@amount; .@i++) { next; mes "Name: "+.@itemname$; mes "Weight: "+.@weight[.@i]; mes "ATK: "+.@atk[.@i]; mes "DEF: "+.@defence[.@i]; mes "Slots: "+.@slots[.@i]; mes "Buying Price: "+.@buy[.@i]; mes "Selling Price: "+.@sell[.@i]; } next; goto L_menu2; L_menu2: menu "Which monster drops it?",-,"Search for another item",L_Item,"Exit",L_later2; atcommand "@whodrops "+@iid$; goto L_menu2; L_later2: close; } -
Character & NPC are small by default issue
Garr replied to Hadeszeus's question in General Server Support
I think there's some size change missing in the latest mob.h SZ_SMALL <> SZ_MEDIUM replacement. -
No, I mean why use *while cycle if simple *if is enough for checking that condition.
-
May I ask what's the point in while if it's supposed to run only once on entrance?
-
I think it's all in that topic you pointed to itself, no? Check your SQL DB for Hercules, table named `login`, and you'll see a column named `character_slots`. If you leave it at 0 all slots are available to characters, if you pass it number between (and including) 1 and MAX_CHARS, people will see "reserved for VIP slots" instead of normal one. At least that's how I understood it without checking it out.
-
1. It's in mmo.h //Max number of characters per account. Note that changing this setting alone is not enough if the client is not hexed to support more characters as well.#define MAX_CHARS 9
-
What about percentheal -100,0? Not that I use reviving in scripting, I prefer to throw players out and see them start all over again if they die /gg But still, nice idea
-
/* Enable HPMHooking when plugins in use rely on Hooking */ //"HPMHooking", There's your problem. This plugin uses hooking.
-
Chat space limitation!/Scammer avoid *Will pay for help*
Garr replied to a question in Source Requests
If I understoof those right, they are typed with either alt+number if there's no x before, otherwise number is translated fro hex to dec and used that way. Like Alt+010 (x0A) gave me new line, same with Alt+013 (x0D), I guess one os them is n, other is r? But not sure. Alt+160 is some "Soft Hyphen", but you know that one already(xA0). (255) is unbreakable space, alt+255. 032 is actually space itself. ETA: New version seems much cleaner *_* -
Chat space limitation!/Scammer avoid *Will pay for help*
Garr replied to a question in Source Requests
Recently I came along this line in char.c: #define TRIM_CHARS "255xA0032tx0Ax0D " //The following characters are trimmed regardless because they cause confusion and problems on the servers. [Skotlex] So there we have few more candidates to be replaced with space So we have: if ( message[i] == 'xA0' || message[i] == '255' || message[i] == '032' || message[i] == 't' || message[i] == 'x0A' || message[i] == 'x0D' ) message[i] = 'x20'; // replace invisible chars with space. -
Try to track what player is causing this, get their inventory info, since it's the easiest way to check if it's an item. It can be some special move/stance after skill with some item that's causing it, that might be tougher to check out. But that's all I can suggest. Or you can use this: RO SETA to check what sprite you're missing if you're getting stack errors. That really helped me a few times.
-
King Poring Recolor - First Time Recoloring
Garr replied to Litro's topic in Spriting & Palette Releases
I like it also. And stealing it for my collection. Thanks! -
Chat space limitation!/Scammer avoid *Will pay for help*
Garr replied to a question in Source Requests
I always wondered, wouldn't it be easier to convert all types of spaces into normal space, and then replace all following each other spaces into one? That could also prevent such abuse, in theory. -
Chat space limitation!/Scammer avoid *Will pay for help*
Garr replied to a question in Source Requests
Hmm, I remember that one. That's indeed a nice idea. But I'm at loss how to implement such a check for every char name used, unless going through all the chars for each message, and it'll kill the messaging. Btw, such trick also works for normal chat window if you leave it at default size, aka pretend you're getting PMs from GM. -
I believe db/(pre-)re/skill_cast_db.txt is what you're looking for. // Structure of Database:// SkillID,CastingTime,AfterCastActDelay,AfterCastWalkDelay,Duration1,Duration2,Cool Down//-- SL_KAAHI463,0,500,0,1800000,500,0 Change 1800000 to 30000, I think it should do the trick.
-
Requesting a script for reading "true" skill point
Garr replied to Ink's question in Script Requests
Checking some more I found that skillpointcount() will basically show how many skill points you'd have if you resetted, aka without quest and 9 basic, BUT for novice it counts in basic skill. Also, each character seems to get a "jobchange_level" variable set on them when they change job, so it's possible to calculate how many points they should have. For 1st/high 1st class It'll be (JobLevel-1) skill points + 9 basic, but we'll throw them out if we'll compare to skillpointcount. For 2nd/trans job it'll be (JobLevel + jobchange_level - 2) total, +9 basic which we won't count again. I'm trying to make a script now, i'll edit it in in a bit. ETA: I didn't test it much, but seems to work. prontera,156,184,5 script LostPointsRestore 100,{.@sk = skillpointcount();if (eaclass()&EAJL_THIRD) {.@sks = JobLevel + jobchange_level + jobchange_level_3rd - 3;} else { if (eaclass()&EAJL_2) { .@sks = jobchange_level + JobLevel - 2; } else { .@sks = JobLevel - 1; }}if (.@sk < .@sks){ dispbottom "It seems something strange happened to your skill points. Here, let me replenish missing ones~"; SkillPoint = SkillPoint + (.@sks-.@sk); dispbottom "There you go. Now everything should be all right. Have fun!";} else { dispbottom "Everything is fine with your skill points! Take care~";}end;} It doesn't take away skill point, only grants missing ones. Further edit: But this only includes up to 2nd/trans jobs. I have yet to think a way to count in 3rd jobs "should have" skillpoints. Edit once more: It seems I am blind. There's "jobchange_level_3rd" variable on each player. How convenient. Edited script to support Novice, 1st, 2nd and 3rd jobs. Haven't tried with extended jobs, but might work as well. -
You only needed to lowercase "ResetSkill" and "ResetStatus". Remember, Hercules script commands are case-sensitive. prontera,148,194,4 script Reset Girl 124,{ set .@zenyabove,500000; //The cost of a reset after reaching the .@blvl settedset .@zenybelow,0; //The cost of a reset before reaching the .@blvl settedset .@blvl,80; //The max base lvl to have a low cost resetset .@resets,1; //Amount of resets available after reaching .@blvl, if you set this to 0, you will have infinite resetsset .@itemid,26002; //The item id you want to make users use when they run out of resets, mine is 26002, if you set this to 0, they will not be able to reset again mes "[Reset Girl]"; mes "I am the Reset Girl, "+(getd(".@zenybelow")>0?"the ^0000FFresetting cost you^000000 ^FF0000"+.@zenybelow+"^000000 zenies.":"the ^0000FFresetting is Free^000000.")+""; mes "After reaching ^0000FFBase lvl "+.@blvl+"^000000 you are able to use my services ^FF0000"+.@resets+" last time"+(getd(".@resets")>1?"s":"")+"^000000 for ^0000FF"+.@zenyabove+" zenies^000000"+(getd(".@itemid")>1?", otherwise you will have to get a ^FF0000"+getitemname(.@itemid)+"^000000.":".")+""; switch(select("Reset Stats","Reset Skills","Reset Both")){ case 1: set .@resetstatus,1; next; goto L_Reset; case 2: set .@resetskills,1; next; goto L_Reset; case 3: set .@resetboth,1; next; goto L_Reset; }close; L_Reset: if( BaseLevel < .@blvl ){ if ( Zeny >= .@zenybelow ){ mes "[Reset Girl]"; if ( .@resetstatus == 1 ) mes "Are you sure you want to ^FF0000Reset Status^000000?"; if ( .@resetskills == 1 ) mes "Are you sure you want to ^FF0000Reset Skills^000000?"; if ( .@resetboth == 1 ) mes "Are you sure you want to ^FF0000Reset Status & Skills^000000?"; if ( .@zenybelow > 0 ) mes "It will cost you ^0000FF"+.@zenybelow+"^000000 zenies."; if (select("Yes:No")==1){ mes "Here you go!"; if ( .@resetstatus == 1 ) resetstatus; if ( .@resetskills == 1 ) resetskill; if ( .@resetboth == 1 ) { resetstatus; resetskill; } set Zeny,Zeny-.@zenybelow; next; mes "[Reset Girl]"; mes "Thank you for using my services!"; } else mes "Come back when you are ready!"; } else mes "You don't have enough money!"; } else{ if( RESETTED >= .@resets ) { if ( .@itemid == 0 ){ mes "Sorry, you cannot use my services anymore."; close; } else { mes "It seems that you have used all your zeny resets."; mes "I will need a ^FF0000"+getitemname(.@itemid)+"^000000!"; next; if( countitem(.@itemid) >= 1 ){ if ( .@resetstatus == 1 ) mes "You are about to ^FF0000Reset Stats^000000 using 1 ^FF0000"+getitemname(.@itemid)+"^000000!";; if ( .@resetskills == 1 ) mes "You are about to ^FF0000Reset Skills^000000 using 1 ^FF0000"+getitemname(.@itemid)+"^000000!";; if ( .@resetboth == 1 ) mes "You are about to ^FF0000Reset Stats & Skills^000000 using 1 ^FF0000"+getitemname(.@itemid)+"^000000!"; mes "^FF0000Are you really sure?^000000"; if (select("Yes:No")==1){ mes "Here you go!"; delitem .@itemid,1; if ( .@resetstatus == 1 ) resetstatus; if ( .@resetskills == 1 ) resetskill; if ( .@resetboth == 1 ) { resetstatus; resetskill; } next; mes "[Reset Girl]"; mes "Thank you for using my services!"; close; } else{ mes "Come back when you are ready!"; } } else{ mes "You do not have any ^FF0000"+getitemname(.@itemid)+"^000000!"; mes "Come back when you get one."; mes "Have a Good day!"; } } } else{ if( Zeny >= .@zenyabove ){ mes "[Reset Girl]"; mes "You are over Level "+.@blvl+"!!"; mes "^FF0000You only have "+(.@resets-RESETTED)+" Resets left!^000000."; next; if ( .@resetstatus == 1 ) mes "Are you sure you want to ^FF0000Reset Status^000000?"; if ( .@resetskills == 1 ) mes "Are you sure you want to ^FF0000Reset Skills^000000?"; if ( .@resetboth == 1 ) mes "Are you sure you want to ^FF0000Reset Status & Skills^000000?"; if ( .@zenyabove > 0 ) mes "It will cost you ^0000FF"+.@zenyabove+"^000000 zenies."; if (select("Yes:No")==1){ mes "Here you go!"; set Zeny,Zeny-.@zenyabove; if ( .@resetstatus == 1 ) resetstatus; if ( .@resetskills == 1 ) resetskill; if ( .@resetboth == 1 ) { resetstatus; resetskill; } if ( .@resets != 0 ) set RESETTED,RESETTED + 1; next; mes "[Reset Girl]"; mes "Thank you for using my services!"; } else{ mes "Come back when you are ready!"; } } else{ mes "Sorry you don't have enough money to use my services."; mes "You need ^0000FF"+.@zenyabove+"^000000 zenies for it."; } } }close;}