-
Posts
1282 -
Joined
-
Last visited
-
Days Won
41
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Skorm
-
This is something I though about doing a long time ago but I wanted to add much more to it. In any case this is a request that I won't be undertaking.
-
Script to check items and auto kick if item not present
Skorm replied to firefox26's question in Script Requests
In the unequip_script of your rental item add. if( strcharinfo(3) == "geffen" && !( countitem(501) -1 ) ) warp "prontera",156,191; And of course replace geffen with your map and 501 with your rental itemid. -
bonus bCritical,5; bonus2 bSkillAtk,62,25; if( eaclass() & EAJ_SWORDMAN ) { bonus bMaxHP,500; bonus bDef,2; bonus bHit,5; bonus bCritical,5; bonus2 bSkillAtk,62,45; }
-
Well it was but then I looked at it again and you were missing the curlys ( { } ) around your if statement. You need those even in an item script. I'd also like to point out that there is a limit of 10 skill buffs per character or at least that's what my console is telling me. So I removed the last few. Here is the modified version that seems to be working. bonus bAllStats,20; if( pow( 2, roclass( ( eaclass() & EAJ_UPPERMASK ) ) ) & 0x1F9788 ) { bonus2 bSkillAtk,62,30; bonus2 bSkillAtk,253,30; bonus2 bSkillAtk,254,30; bonus2 bSkillAtk,136,30; bonus2 bSkillAtk,379,30; bonus2 bSkillAtk,46,45; bonus2 bSkillAtk,46,40; bonus2 bSkillAtk,382,40; bonus2 bSkillAtk,128,45; bonus2 bSkillAtk,394,50; bonus5 bAutoSpellWhenHit,"MG_SAFETYWALL",4,20,BF_WEAPON|BF_MAGIC,0; bonus bMatkRate,50; } About the autobonus thing... In your script you have. bAutoSpellWhenHit,"MG_SAFETYWALL",4,20,BF_WEAPON|BF_MAGIC,0; It should be... bonus5 bAutoSpellWhenHit,"MG_SAFETYWALL",4,20,BF_WEAPON|BF_MAGIC,0;
-
You didn't have bonus5 on your bautobonus command. 2751,Academy_Badge,Academy Of Badge,5,0,,100,,0,,4,0xFFFFFFFF,7,2,136,,0,0,0,{ bonus bAllStats,20; if(Class==Job_Knight||BaseJob==Job_Bard||BaseJob==Job_Dancer||BaseJob==Job_Assassin||BaseJob==Job_Rouge||BaseJob==Job_Priest||BaseJob==Job_Monk||BaseJob==Job_Crusader||BaseJob==Job_Wizard||BaseJob==Job_Blacksmith||BaseJob==Job_Alchemist||BaseJob==Job_TaekwonSage) bonus2 bSkillAtk,62,30; bonus2 bSkillAtk,253,30; bonus2 bSkillAtk,254,30; bonus2 bSkillAtk,136,30; bonus2 bSkillAtk,379,30; bonus2 bSkillAtk,46,45; bonus2 bSkillAtk,46,40; bonus2 bSkillAtk,382,40; bonus2 bSkillAtk,128,45; bonus2 bSkillAtk,394,50; bonus2 bSkillAtk,485,50; bonus2 bSkillAtk,42,40; bonus2 bSkillAtk,230,45; bonus2 bSkillAtk,490,50; bonus2 bSkillAtk,156,300; bonus5 bAutoSpellWhenHit,"MG_SAFETYWALL",4,20,BF_WEAPON|BF_MAGIC,0; bonus2 bSkillAtk,267,40; bonus2 bSkillAtk,271,15; bonus bMatkRate,50; },{ changebase roclass(eaclass()|EAJL_THIRD); },{ changebase Class; } This part here will only work for transcendent Jobs like Assassin Cross. changebase roclass(eaclass()|EAJL_THIRD); For lower jobs you need to add an addition step. roclass(eaclass()|EAJL_2_1|EAJL_THIRD);
-
https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L4972-L4977 In the script section of valk armor in your item database add this. if( getrefine() > 8 ) downrefitem EQI_ARMOR, (getrefine() - 8);
-
sc_start4 SC_ARMOR_ELEMENT,3600000,10,10,10,10; https://github.com/rathena/rathena/blob/master/doc/status_change.txt#L425-L430
-
How the script identify if the whole party member is dead?
Skorm replied to Reborn's question in Scripting Support
Yeah that's actually a good point; I've successfully done it before, but I can see where you're coming from. -
... - script hourly_point_main -1,{ OnInit: .max_hour = 5; .duration = 3600; .npc_name$ = strnpcinfo(3); bindatcmd "hourly", .npc_name$ + "::OnCheck"; end; OnClock0000: deletearray $@hourly_tick; OnUpdate: .@aid = getcharid(3) & 0xFFFF; deltimer .npc_name$+"::OnUpdate"; $@hourly_ticks[.@aid]++; #reward += $@hourly_ticks[.@aid] * 10; OnPCLoginEvent: .@aid = getcharid(3) & 0xFFFF; if ( $@hourly_ticks[.@aid] < .max_hour ) { @timer = gettimetick(2) + .duration; addtimer ( .duration * 1000 ), .npc_name$+"::OnUpdate"; } else { dispbottom "[ Hourly Rewards ] You've reached the daily maximum of "+.max_hour+" hours played, well done!",0x9ae2d7; end; } if ( #reward && $@hourly_ticks[.@aid] ) dispbottom "[ Hourly Rewards ] " + $@hourly_ticks[.@aid] + "/" + .max_hour + " hours played, "+#reward+" point(s)!",0x9ae2d7; end; OnCheck: .@min = (@timer - gettimetick(2))/60; .@sec = (@timer - gettimetick(2))%60; dispbottom "[ Hourly Rewards ] Your next reward will be achieved in " + ((.@min)? "[ " + .@min + " ] minute" + ((.@min > 1)?"s":""):"") + ((.@min && .@sec)? " and ":"") + ((.@sec)? "[ " + .@sec + " ] second" + ((.@sec > 1)?"s":""):"") + "!",0x9ae2d7; end; }
-
A map is either pvp or not... You can set a map to enable pvp by applying a mapflag. https://github.com/rathena/rathena/blob/master/doc/mapflags.txt#L240-L250 <map name>%TAB%mapflag%TAB%<flag>
-
I did hear about this and was slightly concerned. Thanks for clearing that up.
-
Loop Special effect on when card is Compounded on Item
Skorm replied to mervz02's question in Script Requests
The command Emistry picked out won't work the way you want, according to it's description it reads all cards even the ones that are equipped in your inventory, but isequipped should work fine for identifying equipped cards. ( Unless you're running some old server where it doesn't. ) (These kinds of changes are probably best done in src but whatever.) Run these in your SQL DB... You might want to make a backup first though. I tried running it through a script to make the changes less permanent but that didn't work. So this is what you get. UPDATE `item_db_re` SET `script` = CONCAT( `script`, ' if( getrefine() > 9 && !@loop && isequipped(4035) ) { @loop = 1; while( @loop ) { specialeffect2 487; sleep2 1500; } }' ) WHERE `refinable` IS TRUE AND (`equip_locations` & 2 OR `equip_locations` & 16); UPDATE `item_db_re` SET `unequip_script` = CONCAT( `unequip_script`, ' @loop = 0;' ) WHERE `refinable` IS TRUE AND (`equip_locations` & 2 OR `equip_locations` & 16); In case you feel like remove it... UPDATE `item_db_re` SET `script` = REPLACE( `script`, ' if( getrefine() > 9 && !@loop && isequipped(4035) ) { @loop = 1; while( @loop ) { specialeffect2 487; sleep2 1500; } }', '' ) WHERE `refinable` IS TRUE AND (`equip_locations` & 2 OR `equip_locations` & 16); UPDATE `item_db_re` SET `unequip_script` = REPLACE( `unequip_script`, ' @loop = 0;', '' ) WHERE `refinable` IS TRUE AND (`equip_locations` & 2 OR `equip_locations` & 16); -
Before " IgnoreCheck: " in the script add. if( compare( .blacklist$, "|"+getequipid(.@part)+"|" ) ) { mes "[ Keitenai ]"; mes "It looks like I can't enhance that item."; close; } After price " set .Price,10000000; // Prize of random option " in the script add. set .blacklist$, "|1599|2199|512|"; Just follow my formatting to add more items.
-
https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L7171 Use the bindatcmd and direct it to a label that starts the event.
-
The reason your example script didn't work is because for the navigation to correctly work you have to target a valid cell. - script NaviMT -1,{ OnPCLoadMapEvent: if( strcharinfo(3) != "prontera" || #job_master || @delay > gettimetick(2) ) end; @delay = gettimetick(2) + 60; message strcharinfo(0),"Welcome to HallowRO the job master is located at 128 221."; navigateto "prontera",118,222,NAV_ALL,1; end; } prontera mapflag loadevent Then when talking to the job master just set #job_master = 1;
-
I'm super late to this topic but it's funny that you too wanted to split 3rd jobs into a separate trans classes. I had actually been wanting to do that after I realized how much they kinda sucked. I hadn't really though about re-balancing monsters I kinda like how some monsters are broken in terms of exp because it gives old players the advantage. 1. Split third classes, and rebalance them to be as good as the old transcendent jobs. 2. Update the client to support animation calls from server side scripts. The npcs and quests in Ragnarok are so dull, because nothing really happens when you do them. I want dynamically animated npcs and objects. : ) 3. HDRO Same sprites but pixel perfect also a re-sizable UI with anti-aliased font.
-
This isn't really the typical way of doing something like you've requested but I wanted to show that it can be done pretty easily with addrid. prontera,162,186,1 script addrid_test 100,{ function addrid_func { .@enter = 1; setd( ".map_"+getarg(0)+"$", getarg(1) ); addrid( 2, 0, getarg(0) ); .@map$ = getd( ".map_"+getcharid(1)+"$" ); if( strcharinfo(3) == .@map$ ) setd( ".party_"+getcharid(1)+"$["+getarraysize( getd( ".party_"+getcharid(1)+"$" ) )+"]", getcharid(3) ); if( .@enter ) return rand( getarraysize( getd( ".party_"+getcharid(1)+"$" ) ) ); else end; } .@party_id = getcharid(1); .@rand = addrid_func( .@party_id, strcharinfo(3) ); .@lucky_aid = getd( ".party_"+.@party_id+"$["+.@rand+"]" ); getitem 512, 10, .@lucky_aid; announce "Loot has been assigned to: "+rid2name( .@lucky_aid )+".", bc_pc|bc_area; setd( ".map_"+.@party_id+"$", "" ); deletearray getd( ".party_"+.@party_id+"$" ); end; }
-
Hold another community scripting event I'm mad that goddamnit is the only one with that badge. Perhaps whoever can come up with the best instance. Then they will all be released for free. But thanks for adding this back I haven't a single badge, so it's cool.
-
I just wanted to add on Akky's answer a little. I don't necessarily recommend either of these options because if your server has lots of players it can create stress. You should always remove the variable from the script that originally assigned it after it's done being used. With that said here are two ways of removing a variable/array when players enter a specific map. Method one OnPCLoadMapEvent: - script delete_var_123 -1,{ OnPCLoadMapEvent: if( strcharinfo(3) == "prontera" ) { deletearray player_array; // You can remove arrays with this command. player_variable = 0; // As Akky said remove variables by setting them to zero. } } prontera mapflag loadevent Method two OnTouch: prontera,1,1,1 script delete_var_111 111,1111,1111,{ OnTouch: deletearray player_array; // You can remove arrays with this command. player_variable = 0; // As Akky said remove variables by setting them to zero. }
-
How the script identify if the whole party member is dead?
Skorm replied to Reborn's question in Scripting Support
I would use the partylock mapflag. -
How the script identify if the whole party member is dead?
Skorm replied to Reborn's question in Scripting Support
'party_id = getcharid(1); 'ins_rid = getattachedrid(); donpcevent instance_npcname("#ins_die_event_sub") + "::OnPartyCheck"; Does that actually work? Setting the instance variable in a non-instanced npc and then passing it to an instanced npc? But yeah I agree it's a pain the only time it isn't that difficult is when using the battleground system. I thought about just copying the array for partycid into an instanced one and setting each player with a temp variable that corresponded to their position on the array removing them and getting the size each time they logout or die. And doing an initial check to see if they were online when the instance was created. I think then you wouldn't need to check everything everytime someone dies.