-
Content Count
366 -
Joined
-
Last visited
-
Days Won
8
Reputation Activity
-
Patskie got a reaction from ThyroDree in HW/Sage Soul Link Modification
I have tried this and works fine on my test server. You can check it :
src/map/status.c :
Add ( Line 4212 ) :
if(sc->data[SC_SOULLINK] && (sc->data[SC_SOULLINK]->val2 == SL_WIZARD || sc->data[SC_SOULLINK]->val2 == SL_SAGE)) vit += ((TBL_PC*)bl)->status.int_ / 5;
Add ( Line 5564 ) :
if(sc->data[SC_SOULLINK] && (sc->data[SC_SOULLINK]->val2 == SL_WIZARD || sc->data[SC_SOULLINK]->val2 == SL_SAGE)) maxhp += ((TBL_PC*)bl)->status.base_level * 200; -
Patskie got a reaction from leloush in Question guys..
- script Sample -1,{ OnMinute00: query_sql "SELECT `account_id` FROM `char` WHERE `last_map` = 'prontera' ORDER BY RAND() LIMIT 1",.@aid; if ( attachrid( .@aid ) ) warp "prontera",150,150; end;}
Randomly choose a character on map prontera. Attach their account id and then do the warp.
-
-
Patskie got a reaction from leloush in Refiner to +10
Didn't test :
- successrefitem @refine;+ for ( .@i = getequiprefinerycnt(@refine)+1; .@i < 11; .@i++ ) + successrefitem @refine; -
Patskie reacted to jaBote in Guild Prize Giver
The script had an error by default.
Change line 25 to:
setarray .@reward[0],671,1; //<Item_ID>,<Amount>{,...}
And I think the loops at line 45 and 46 aren't correct. If you get problems try changing
for(set .@i,0;.@i<getarraysize(.@reward);set .@i,.@i+1) if (!checkweight(.@reward[.@i],.@reward[.@i+1])) { mes " "; mes "^FF0000Overweight!^000000"; close; } for(set .@i,0;.@i<getarraysize(.@reward);set .@i,.@i+1) getitem .@reward[.@i],.@reward[.@i+1]; to:
for(set .@i,0;.@i<getarraysize(.@reward);set .@i,.@i+2) if (!checkweight(.@reward[.@i],.@reward[.@i+1])) { mes " "; mes "^FF0000Overweight!^000000"; close; } for(set .@i,0;.@i<getarraysize(.@reward);set .@i,.@i+2) getitem .@reward[.@i],.@reward[.@i+1];
Full script fixed (I think):
//===== Hercules Script ======================================//= Guild Prize Giveaway//===== By: ==================================================//= AnnieRuru / Mysterious / Joseph//===== Current Version: =====================================//= 1.7//===== Compatible With: =====================================//= Hercules//===== Description: =========================================//= Rewards guild masters of castle owners after each//= War of Emperium session.//===== Additional Comments: =================================//= v1.0 - Intitial Re-release [Mysterious]//= v1.1 - Language structures [Mysterious]//= v1.2 - Added divisions [Mysterious]//= v1.3 - Added proper information [Mysterious]//= v1.4 - Optimized! [Euphy]//= v1.5 - Little bit of cleaning [Mysterious]//= v1.6 - Fixed Agit on/off corruption. [Joseph]//= v1.7 - Fixed overweight issues [Joseph]//= v1.8 - Fixed default script failing to parse, and a //= possible issue on the getitem and overweight //= checking loops [jaBote]//============================================================prontera,163,166,4 script Castle Rewards 871,{ function GetCastle; setarray .@reward[0],671,1; //<Item_ID>,<Amount>{,...} set .@n$,"["+strnpcinfo(0)+"]"; mes "Your guild [^0000FF"+getguildname(getcharid(2))+"^000000] has conquered:"; for(set .@i,0;.@i<getarraysize(.Castles$);set .@i,.@i+1) if (getcastledata(.Castles$[.@i],1) == getcharid(2)) { mes " > "+getcastlename(.Castles$[.@i])+""; set .@c,1; setarray .@uh$[getarraysize(.@uh$)],.Castles$[.@i],(1<<.@i); } if (!.@c) { mes " > No castles."; close; } next; if (select(((getguildmasterid(getcharid(2))==getcharid(0))?((agitcheck()||agitcheck2())?"":"Redeem Reward"):"")+":Close")==2) close; mes .@n$; mes "Please select a castle to redeem your guild reward."; for(set .@i,0;.@i<getarraysize(.@uh$);set .@i,.@i+2) set .@m$,.@m$+($castle_reward&(1<<GetCastle(atoi(.@uh$[.@i+1])))?"^0000FF":"^FF0000")+getcastlename(.@uh$[.@i])+"^000000:"; next; set .@m,select(.@m$)-1; if ($castle_reward&(1<<GetCastle(atoi(.@uh$[.@m*2+1])))) { mes .@n$; mes "Here's your reward for conquering ^0000FF"+getcastlename(.@uh$[.@m*2])+"^000000."; mes "You should divide these among your guild members."; for(set .@i,0;.@i<getarraysize(.@reward);set .@i,.@i+2) if (!checkweight(.@reward[.@i],.@reward[.@i+1])) { mes " "; mes "^FF0000Overweight!^000000"; close; } for(set .@i,0;.@i<getarraysize(.@reward);set .@i,.@i+2) getitem .@reward[.@i],.@reward[.@i+1]; set $castle_reward,$castle_reward^(1<<GetCastle(atoi(.@uh$[.@m*2+1]))); close; } mes .@n$; mes "It seems like you've redeemed the reward."; close; function GetCastle { for(set .@j,0;.@j<getarraysize(.Castles$);set .@j,.@j+1) { set .@c1,.@c2|(1<<.@j); if (getarg(0)==.@c1) return .@j; } return -1; }OnAgitEnd:OnAgitEnd2: for(set .@i,0;.@i<getarraysize($WOE_CONTROL);set .@i,.@i+4) if (gettime(4)==$WOE_CONTROL[.@i] && gettime(3)==$WOE_CONTROL[.@i+2] && $castle_reward&(1<<GetCastle($WOE_CONTROL[.@i+3])) == 0) set $castle_reward,$castle_reward|(1<<GetCastle($WOE_CONTROL[.@i+3])); end; OnInit: setarray .Castles$, "prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05", "payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05", "gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05", "aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05", "arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05", "schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05"; end;} -
Patskie got a reaction from mrlongshen in Item Shower
makeitem .item_id,1,.map$,.@x,.@y;+ announce "An [" +getitemname(.item_id)+ "] has been drop from the sky in map [" +.map$+ "]. Lets get it before it gone..",0; -
Patskie got a reaction from mrlongshen in Item Shower
Description : Drop certain amount of items on the floor on a certain map with random coordinates
Download :
http://pastebin.com/raw.php?i=aCAbAM1E
https://raw.github.com/Patskie/Scripts/master/item_shower.txt
-
Patskie got a reaction from jaBote in Request Script
OnPCJobLvUpEvent:if ( JobLevel == 10 ) mes "Pop up";close; -
Patskie got a reaction from jaBote in delete certain items when entering the map.
It would be great if you post all your request at your topic description so that people who will help you out will not re-write their initial script.
-
Patskie got a reaction from karazu in Warper with payment(item) and Menu
prontera,150,150,0 script Sample 100,{ if ( countitem(.item_id) < .amount ) close; mes .n$; mes "Hey where would you like to go?"; next; for ( .@i = 0; .@i < .size; .@i++ ) { .@menu$ += .Desc$[.@i]; .@menu$ += ":"; } .@s = select(.@menu$) - 1; mes .n$; mes "So you want to go to " +strtolower(.Maps$[.@s])+ "?"; next; if ( select("Yes:No") - 1 ) close; mes .n$; mes "Bye!"; delitem .item_id, .amount; warp strtolower(.Maps$[.@s]),0,0; close; OnInit: setarray .Desc$[0],"The City of Pride","The City of Genius","The City of Patskie"; setarray .Maps$[0],"payon","prontera","geffen"; .size = getarraysize(.Desc$); .item_id = 7227; .amount = 5; .n$ = "[" +strnpcinfo(1)+ "]"; end;} -
Patskie got a reaction from Mumbles in Warper with payment(item) and Menu
prontera,150,150,0 script Sample 100,{ if ( countitem(.item_id) < .amount ) close; mes .n$; mes "Hey where would you like to go?"; next; for ( .@i = 0; .@i < .size; .@i++ ) { .@menu$ += .Desc$[.@i]; .@menu$ += ":"; } .@s = select(.@menu$) - 1; mes .n$; mes "So you want to go to " +strtolower(.Maps$[.@s])+ "?"; next; if ( select("Yes:No") - 1 ) close; mes .n$; mes "Bye!"; delitem .item_id, .amount; warp strtolower(.Maps$[.@s]),0,0; close; OnInit: setarray .Desc$[0],"The City of Pride","The City of Genius","The City of Patskie"; setarray .Maps$[0],"payon","prontera","geffen"; .size = getarraysize(.Desc$); .item_id = 7227; .amount = 5; .n$ = "[" +strnpcinfo(1)+ "]"; end;} -
Patskie got a reaction from Mumbles in Warper with payment(item) and Menu
Here you go!
prontera,150,150,0 script Sample 100,{ if ( countitem(.item_id) < .amount ) close; mes .n$; mes "Hey where would you like to go?"; next; .@s = select(implode(.Maps$, ":")) - 1; mes .n$; mes "So you want to go to " +strtolower(.Maps$[.@s])+ "?"; next; if ( select("Yes:No") - 1 ) close; mes .n$; mes "Bye!"; delitem .item_id, .amount; warp strtolower(.Maps$[.@s]),0,0; close; OnInit: setarray .Maps$[0],"Payon","Prontera","Geffen"; .item_id = 7227; .amount = 5; .n$ = "[" +strnpcinfo(1)+ "]"; end;} -
Patskie got a reaction from caspe in delete certain items when entering the map.
Supports multiple items and multiple maps configuration ( check the OnInit part ) :
- script Sample -1,{ OnPCLoadMapEvent: getmapxy .@map$, .@xx, .@yy, 0; for ( .@x = 0; .@x < getarraysize(.Maps$); .@x++ ) { for ( .@y = 0; .@y < .size; .@y++ ) { if ( .@map$ == .Maps$[.@x] && countitem(.item_id[.@y]) ) { dispbottom "Item " +getitemname(.item_id[.@y])+ " (" +countitem(.item_id[.@y])+ ") was deleted on your inventory"; delitem .item_id[.@y], countitem(.item_id[.@y]); } } } end; OnInit: setarray .Maps$[0],"prontera","payon","geffen"; setarray .item_id[0],501,502; .size = getarraysize(.item_id); for ( .@i = 0; .@i < getarraysize(.Maps$); .@i++ ) setmapflag .Maps$[.@i], mf_loadevent; end;} -
Patskie got a reaction from jaBote in limited broadcast
prontera,150,150,0 script Sample 100,{ mes "Input your message"; next; input .@m$; close2; if ( .@m$ != "" ) { query_sql "SELECT `account_id` FROM `char` WHERE `base_level` < 20 AND `online` = '1'",.@aid; while ( .@i < getarraysize(.@aid) ) { if ( attachrid( .@aid[.@i] ) ) dispbottom "" + .@m$ + ""; detachrid; .@i++; } } end;} -
-
Patskie got a reaction from karazu in NPC that will do @monsterkill2
prontera,150,150,0 script Sample 123,{ if ( #timer > gettimetick(2) ) { mes "[Sample]"; mes "Time left before you can use me : " +(#timer - gettimetick(2))+ " seconds."; close; } mes "[Sample]"; mes "What you want to do?"; next; if (select("Refresh Monster:Cancel") - 1) close; mes "[Sample]"; mes "Done!"; #timer = gettimetick(2) + 3600000; close2; atcommand "@killmonster2"; end;} -
Patskie got a reaction from jaBote in buffer npc
Full protection at Hercules i guess :
SC_PROTECTWEAPON 72SC_PROTECTSHIELD 73SC_PROTECTARMOR 74SC_PROTECTHELM 75 rAthena and Hercules have different const.txt. Please refer to db/const.txt
-
-
Patskie got a reaction from Mumbles in Monster Cash Point
Not sure about your idea to give 1 cash point whenever a certain player kills monster who's level is less than the baselevel - 10. It can be abuse
- script Sample -1,{ OnNPCKillEvent: if (getmonsterinfo(killedrid, MOB_LV) > (BaseLevel + 10) || getmonsterinfo(killedrid, MOB_LV) < (BaseLevel - 10)) { if (rand(100) < 5) #CASHPOINTS++; dispbottom "You now have " +#CASHPOINTS+ " cash points."; } end;} -
Patskie got a reaction from kerbiii in Help with this script please
^
*bindatcmd "command","<NPC object name>::<event label>"{,<group level>,<group level char>,<log>}; You can also disregard the 0,99 part since the @warp command is used by all users ( normal players or not ) in most private servers.
-
Patskie got a reaction from ThyroDree in Someone Help me Item Script
This
1. itemid,item name,....{ if (isequipped(<yin_yang_id_number>)) { skill "TK_SEVENWIND",4; } },{},{ sc_end "TK_SEVENWIND"; }2. itemid,item name,....{ if ( getrefine() == 10 ) { bonus2 bSkillAtk,490,5; } },{},{}3. itemid,item name,....{ if ( getrefine() == 10 ) { bonus2 bSkillAtk,"AC_DOUBLE",5 bonus2 bSkillAtk,"SN_SHARPSHOOTING",5; } },{},{} Edit : add a sc_end
-
Patskie got a reaction from karazu in @killmonster2 every five hours?
Give a try
- script Sample -1,{ OnMinute00: if ((gettime(3)%5)==0) atcommand "@killmonster2"; end;} -
Patskie got a reaction from Mumbles in looking for card seller
Sample ( a shop selling poring card for 500 zeny and fabre card for 1000 zeny ) :
prontera,150,150,0 shop Sample 100,4001:500,4002:1000 Reference ( https://raw.github.com/HerculesWS/Hercules/master/doc/script_commands.txt ) :
** Define a shop/cashshop NPC.-%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}<map name>,<x>,<y>,<facing>%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}This will define a shop NPC, which, when triggered (which can only be doneby clicking) will cause a shop window to come up. No code whatsoever runsin shop NPCs and you can't change the prices otherwise than by editing thescript itself (no variables even exist at this point of scripting, sodon't even bother trying to use them).The item id is the number of item in the 'item_db.txt' database. If Priceis set to -1, the 'buy price' given in the item database will be used.Otherwise, the price you gave will be used for this item, which is how youcreate differing prices for items in different shops.You can alternatively use "cashshop" in place of "shop" to use the CashShop interface, allowing you to buy items with special points (Currentlystored as account vars in global_reg #CASHPOINTS and #KAFRAPOINTS). Thistype of shop will not allow you to sell items at it, you may only purchaseitems here. The layout used to define sale items still count, and"<price>" refers to how many points will be spent purchasing the them. -
Patskie got a reaction from Mission in looking for card seller
Sample ( a shop selling poring card for 500 zeny and fabre card for 1000 zeny ) :
prontera,150,150,0 shop Sample 100,4001:500,4002:1000 Reference ( https://raw.github.com/HerculesWS/Hercules/master/doc/script_commands.txt ) :
** Define a shop/cashshop NPC.-%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}<map name>,<x>,<y>,<facing>%TAB%shop%TAB%<NPC Name>%TAB%<sprite id>,<itemid>:<price>{,<itemid>:<price>...}This will define a shop NPC, which, when triggered (which can only be doneby clicking) will cause a shop window to come up. No code whatsoever runsin shop NPCs and you can't change the prices otherwise than by editing thescript itself (no variables even exist at this point of scripting, sodon't even bother trying to use them).The item id is the number of item in the 'item_db.txt' database. If Priceis set to -1, the 'buy price' given in the item database will be used.Otherwise, the price you gave will be used for this item, which is how youcreate differing prices for items in different shops.You can alternatively use "cashshop" in place of "shop" to use the CashShop interface, allowing you to buy items with special points (Currentlystored as account vars in global_reg #CASHPOINTS and #KAFRAPOINTS). Thistype of shop will not allow you to sell items at it, you may only purchaseitems here. The layout used to define sale items still count, and"<price>" refers to how many points will be spent purchasing the them. -
Patskie reacted to jaBote in Wandering Poring v1.0
Whops, sorry Patskie, was trying to reply Mission all the time on last post