-
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
-
How the script identify if the whole party member is dead?
Skorm replied to Reborn's question in Scripting Support
There are plenty of ways to do this here's one. //Set this after the instance is created and with an npc that is attached to the instance ID. getpartymember( getcharid(1) ); 'instance_members = $@partymembercount; //Do this within an npc that is attached to the instance. OnPCDieEvent: 'instance_members--; if( !'instance_members ) { //Oh crap everyone is dead!!! } end; -
Not that I know of... I've never tried OnEquip_Script inside of a npc script but I don't see how that would even work. That being said there is an alternative. I'm just going to post the two methods I worked out feel free to use either although they are both untested. Simple: - script set_script_npc -1,{ for( .@a = 0; .@a < .len; .@a++ ) setitemscript .item_ids[.@a], "{ atcommand \"@refine "+getiteminfo( .item_ids[.@a], 5 )+" 20\"; }", 1; end; OnInit: setarray .item_ids, 2220, 2301, 1201, 2101; .len = getarraysize( .item_ids ); } Convoluted: - script set_script_npc -1,{ for( .@a = 0; .@a < .len; .@a++ ) { .@equip_loc = getiteminfo( .item_ids[.@a], 5 ); for( .@b = 0; pow( 2, .@b ) <= .@equip_loc; .@b++ ) if( .@equip_loc & pow( 2, .@b ) ) { setitemscript .item_ids[.@a], "{ callfunc(\"on_eq_refiner\","+.script_equip_slot[.@a]+"); }", 1; break; } } end; OnInit: setarray .item_ids, 2220, 2301, 1201, 2101; setarray .script_equip_slot, EQI_HEAD_LOW, EQI_HAND_R, EQI_ACC_R, EQI_ARMOR, EQI_HAND_L, EQI_SHOES, EQI_ACC_L, EQI_HEAD_TOP, EQI_HEAD_MID, EQI_COSTUME_HEAD_TOP, EQI_COSTUME_HEAD_MID, EQI_COSTUME_HEAD_LOW, EQI_COSTUME_GARMENT, 0, EQI_AMMO, EQI_SHADOW_ARMOR, EQI_SHADOW_WEAPON, EQI_SHADOW_SHIELD, EQI_SHADOW_SHOES, EQI_SHADOW_ACC_R, EQI_SHADOW_ACC_L; .len = getarraysize( .item_ids ); } function script on_eq_refiner { .@refine = getequiprefinerycnt( getarg(0) ); if( .@refine < 20 ) successrefitem getarg(0), 20 - .@refine; return; }
-
It's always great to see new talent.
-
need help creating a random picking item box
Skorm replied to quakeman00's question in Scripting Support
I believe they just added it directly in source, but trust me I just went over this with someone else and it works. -
need help creating a random picking item box
Skorm replied to quakeman00's question in Scripting Support
You need to add IG_LPumpkinBox to your db/const.txt file like. IG_LPumpkinBox 5555 IG_LPumpkinBox,57002,2 getrandgroupitem(IG_LPumpkinBox,1); Alternatively you can just declare an ID instead of a variable in the item_group_db.txt as well like. 5555,57002,2 Then call it with getrandgroupitem like. getrandgroupitem(5555,1); This helps when trying to keep everything in an import file. -
You'd probably be better off using bonus_script. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L5491 Have you tried just spawning the Tao card as a rental item. I can't remember if that works. If all else fails. if( player_tick > gettimetick(2) ){ bonus bMaxHPrate,80; bonus bDef,-30; bonus bMdef,-30; } else player_tick = 0; Then when you give the players the card set player tick. player_tick = gettimetick(2) + 60 * 60 * 24; //24 hours. That's all I can think of right now but there's probably something I'm missing.
-
You can try the summon command just be sure to run it from an npc that isn't attached to the player. *summon "monster name",<monster id>{,<Time Out>{,"event label"}}; Some other methods... .mob_id = monster("<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>",<size>,<ai>}); startnpctimer; end; OnTimer<time>: unitkill .mob_id; stopnpctimer; end; You could do the same thing as above but with killmonster instead. monster("<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"NPC::OnBlahbanditded",<size>,<ai>}); startnpctimer; end; OnTimer<time>: killmonster "<map name>","NPC::OnBlahbanditded"; stopnpctimer; end; OnBlahbanditded: end;
-
Yeah I'm working on -something real top secret like- so it's got me a little more active.
-
-
Is there any realiable and free Anti-Cheat System
Skorm replied to xeNium's question in General Support
There are a few free ones out there but most have some draw backs. I think the best security comes with understanding how to make them all work together. Like there are options to secure your GRFs. Then there are options to only allow specific client versions and MD5 hash. If someone wants to use autohot keys provide it to everyone. Develop scripts to prevent bots. You can even integrate your data.ini within your client. If your server is unique in how to defend against bots it's going to be more secure than a product putout by a team that stops being supported and everyone else has. -
I'm not all that great at source but I did update this script to work with the most recent version of rAthena as of 1/1/17. I also added the bitwise operation thing people were asking for. I noticed that MAX_ITEMDB was never set so that was change to MAX_ITEMID which increased the size of the array and instead of resizing it which is a pain in that butt with C I just had to break the loop when it runs out of bonuses. I couldn't figure out how to make a patch file from a git commit so I just kinda made my own. So it probably won't work like a normal patch and instead you'll have to manually add the changes. Extra_bonus.patch
-
Yeah you might want to add a hyphen or something in between RAGNA and rok though just encase legal things.
-
It's pretty good I think the sword is kinda out of place and the Journey bit doesn't really need to be there though. Also the fact that is say Ragna Ragnarok online is a bit weird I would try and incorporate it all together someway that flows well. RAGNArok Online.
-
The fact that you have to come to the rAthena board to ask this question simple because eathena.ws is no more should be a sufficient answer.
-
Title says it all. It's been a good one and hopes to many more.
-
Just adding to @Nitrous's answer here... - script Mob Death -1,{ OnPCDieEvent: if( killerrid > 100000000 ) { getunitdata( killerrid, .@killerrid ); if( getarraysize(.@killerrid) == 49 ) dispbottom "You were killed by "+getmonsterinfo( .@killerrid[13], MOB_NAME )+"."; } }
-
@Tokei Yeah I'm completely aware of that xD. I also understand where you're coming from before. Which is why in most of the scripts I answer I say "Ok, here is one way of doing it." It might not be optimal but a lot of the time information is omitted from the request. If the person requesting the script said they wanted to duplicate this npc 500 times I wouldn't do what I've done here, but we're not being paid and if the specifics aren't there I'm going to take the quicker route. Thank you for being so understanding.
-
Why not just use npc variables? If the other npcs are duplicates of a single npc they can all share a single npc array. Then just shuffle the array as you go... You can never shuffle a deck enough. prontera,151,183,0 script NPC#0 77,{ .@id = atoi(strnpcinfo(2)); dispbottom "Variable " + (.@id + 1) + ": " + .npc_variables[.@id]; end; OnInit: .@len = getarraysize(.npc_variables); .npc_variables[.@len] = atoi(strnpcinfo(2))+1; for ( .@i = 0; .@i < .@len + 1; .@i++ ){ .@n = ( rand(gettimetick(0)) % ( .@i + 1 ) ); .@temp = .npc_variables[.@i]; .npc_variables[.@i] = .npc_variables[.@n]; .npc_variables[.@n] = .@temp; } } prontera,153,183,0 duplicate(NPC#0) NPC#1 77 prontera,155,183,0 duplicate(NPC#0) NPC#2 77 prontera,157,183,0 duplicate(NPC#0) NPC#3 77
-
Looking for only the guild name and all players get buff~
Skorm replied to crystalro's question in Script Requests
prontera,184,177,5 script Guild Buffer 100,{ setarray .@sc_effect, SC_INCREASEAGI, SC_BLESSING, SC_ANGELUS; setarray .@skil_txt$, "Increase Agility", "Blessing", "Angelus"; setarray .@ticks , 200000, 200000, 200000; setarray .@skil_num , 29, 34, 33; setarray .@levels , 10, 10, 10; .@len = getarraysize(.@sc_effect); if( !strcmp( strcharinfo(2), "Emperor" ) ) { for( .@a = 0; .@a < .@len; .@a++ ) { misceffect 253; skilleffect .@skil_num[.@a], .@levels[.@a]; sc_start .@sc_effect[.@a], .@ticks[.@a], .@levels[.@a]; message strcharinfo(0),"Buff ["+.@skil_txt$[.@a]+"] Added."; } } end; } If you mean one person clicks the buffer and entire guild gets buffed... I limited it to just the guild master and only once per minute... -
Did you update your map-cache?
-
Everything you need to know is on the wiki please read it thoroughly. https://github.com/rathena/rathena/wiki/Custom_Items
-
ordeal_2-1.gat mapflag noskill Use tabs instead of spaces in npc headers. Please go through and read the top portion of this file thoroughly https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L132
-
CAN ANYONE GIVE ME THE MVP NPC SCRIPT and help me Unknown Item :3
Skorm replied to blueleaf711's question in Script Requests
Exchanger [ Cashpoint to Coins ] Exchanger [ Poring Coin - Zeny ] Exchanger [ Points to Tickets ] Exchanger [ Item to Item ] Exchanger [ Item to Item ] Exchanger [ Multi Item to 1 Item ] So it's not any of those? If it's something directly from the SQL database I might have to make that. I think there are some floating around but I can't find them right away. Edit: So here's the converter that I couldn't find. I just made one it's untested and I'm not 100% sure what CP it works with but I think it's Flux. prontera,184,177,5 script Credit Trader 851,{ .@zeny_worth = 1000000; query_sql ( "SELECT `balance` FROM `cp_credits` WHERE `account_id` = "+getcharid(3)+";", .@credits ); mes "What would you like to do?"; next; .@select = select("Credits -> Zeny?:Zeny -> Credits?") -1; mes "How "+( .@select ? "much zeny" : "many credits" )+" would you like to convert?"; mes .@select ? "Zeny: ^0000FF"+Zeny+"^000000" : "Credits: ^0000FF"+.@credits+"^000000"; next; if( input( .@withdraw, 1, .@select ? Zeny : .@credits ) != 0 ) { mes "Please input a number between 1 and ^0000FF"+(.@select ? Zeny : .@credits)+"^000000."; close; } if( .@select && .@withdraw < .@zeny_worth ) { mes "Each credit costs at least ^0000FF"+.@zeny_worth+"^000000 Zeny."; close; } mes "Are you sure?"; mes .@select ? "^0000FF"+.@withdraw+"^000000 Zeny -> ^00FF00"+( .@withdraw / .@zeny_worth )+"^000000 Credits."; : "^0000FF"+.@withdraw+"^000000 Credits -> ^00FF00"+( .@withdraw * .@zeny_worth )+"^000000 Zeny."; next; if( select("Yes:No") == 2 ) { mes "Alright come again!"; close; } Zeny = .@select ? ( ( Zeny - .@withdraw ) + ( .@withdraw % .@zeny_worth ) ) : Zeny + ( .@withdraw * .@zeny_worth ); query_sql ( "UPDATE `cp_credits` SET `balance` = "+( .@select ? .@credits + ( .@withdraw / .@zeny_worth ) : .@credits - .@withdraw )+" WHERE `account_id` = "+getcharid(3)+";" ); mes "Thanks for using our service have a nice day."; close; } -
CAN ANYONE GIVE ME THE MVP NPC SCRIPT and help me Unknown Item :3
Skorm replied to blueleaf711's question in Script Requests
What kind of credit... Donation credits or kafra credits? -
CAN ANYONE GIVE ME THE MVP NPC SCRIPT and help me Unknown Item :3
Skorm replied to blueleaf711's question in Script Requests
MVP ROOMS GOLD ROOMS These questions have been asked hundreds of times over.