caspa

Members
  • Content Count

    464
  • Avg. Content Per Day

    0
  • Joined

  • Last visited

Community Reputation

2 Neutral

2 Followers

About caspa

  • Rank
    Metaling

Profile Information

  • Gender
    Male

Recent Profile Visitors

2,726 profile views
  1. caspa

    bindatcmd patch error :(

    can anybody help me why this error is occuring of how to fix it? this is the patch... rewrite/doc/script_commands.txt | 26 ++++++++++- rewrite/src/map/atcommand.c | 40 +++++++++++++++++ rewrite/src/map/atcommand.h | 13 ++++++ rewrite/src/map/npc.c | 63 ++++++++++++++++++++++++++ rewrite/src/map/npc.h | 10 +++++ rewrite/src/map/script.c | 97 +++++++++++++++++++++++++++++++++++++++++ rewrite/src/map/script.h | 3 ++ 7 files changed, 251 insertions(+), 1 deletion(-)diff --git a/rewrite/doc/script_commands.txt b/rewrite/doc/script_commands.txtindex db45581..6b25976 100644--- a/rewrite/doc/script_commands.txt+++ b/rewrite/doc/[email protected]@ -4,7 +4,7 @@ //= A reference manual for the eAthena scripting language. //= Commands are sorted depending on their functionality. //===== Version ===========================================-//= 3.51.20130619+//= 3.52.20160410 //========================================================= //= 1.0 - First release, filled will as much info as I could //= remember or figure out, most likely there are errors,@@ -194,6 +194,8 @@ //= 3.51.20130619 //= Added 'setdragon', 'checkdragon', 'setwug', 'checkwug', //= 'setwugrider', 'checkwugrider', 'setmadogear', 'checkmadogear'. [Rytech]+//= 3.52.20160410+//= Added 'bindatcmd', 'unbindatcmd', 'useatcmd' [15peaces] //========================================================= This document is a reference manual for all the scripting commands and functions @@ -2153,6 +2155,28 @@ array, shifting all the elements beyond this towards the beginning. --------------------------------------- +*bindatcmd "command","{NPC NAME}::<event label>"{,atcommand level,charcommand level}; +*bindatcmd ("command","{NPC NAME}::<event label>"{,atcommand level,charcommand level}); ++This command will bind a NPC event label to an atcommand. Upon execution of +the atcommand the user will invoke the NPC event label. ++--------------------------------------- + +*unbindatcmd "command"; +*unbindatcmd ("command"); + +This command will unbind a NPC event label from an atcommand. ++--------------------------------------- + +*useatcmd "command"; +*useatcmd ("command"); + +This command will execute a custom atcommand on the attached RID from a script. + + ---------------------------------------+ ====================================== |2.- Information-retrieving commands.| ======================================diff --git a/rewrite/src/map/atcommand.c b/rewrite/src/map/atcommand.cindex c22ff1b..d346b3d 100644--- a/rewrite/src/map/atcommand.c+++ b/rewrite/src/map/[email protected]@ -64,6 +64,17 @@ typedef struct AtCommandInfo static AtCommandInfo* get_atcommandinfo_byname(const char* name); static AtCommandInfo* get_atcommandinfo_byfunc(const AtCommandFunc func); +// @commands (script-based) +struct Atcmd_Binding* get_atcommandbind_byname(const char* name) +{ + int i = 0; + if( *name == atcommand_symbol || *name == charcommand_symbol ) + name++; // for backwards compatibility + ARR_FIND( 0, ARRAYLENGTH(atcmd_binding), i, strcmp(atcmd_binding[i].command, name) == 0 ); + return ( i < ARRAYLENGTH(atcmd_binding) ) ? &atcmd_binding[i] : NULL; + return NULL; +}+ ACMD_FUNC(commands); @@ -9539,6 +9550,9 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message TBL_PC * ssd = NULL; //sd for target AtCommandInfo * info; + // @commands (script based) + Atcmd_Binding * binding;+ nullpo_retr(false, sd); //Shouldn't [email protected]@ -9627,6 +9641,32 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message if( sscanf(atcmd_msg, "%99s %99[^\n]", command, params) < 2 ) params[0] = '\0'; + // @commands (script based) + if(type == 1) { + // Check if the command initiated is a character command + if (*message == charcommand_symbol && + (ssd = map_nick2sd(charname)) == NULL && (ssd = map_nick2sd(charname2)) == NULL ) + { + sprintf(output, "%s failed. Player not found.", command); + clif_displaymessage(fd, output); + return true; + } ++ // Get atcommand binding + binding = get_atcommandbind_byname(command); ++ // Check if the binding isn't NULL and there is a NPC event, level of usage met, et cetera + if( binding != NULL && binding->npc_event[0] && + ((*atcmd_msg == atcommand_symbol && pc_isGM(sd) >= binding->level) || + (*atcmd_msg == charcommand_symbol && pc_isGM(sd) >= binding->level2))) + { + // Check if self or character invoking; if self == character invoked, then self invoke. + bool invokeFlag = ((*atcmd_msg == atcommand_symbol) ? 1 : 0); + npc_do_atcmd_event((invokeFlag ? sd : ssd), command, params, binding->npc_event); + return true; + } + }+ //Grab the command information and check for the proper GM level required to use it or if the command exists info = get_atcommandinfo_byname(command); if( info == NULL || info->func == NULL || ( type && ((*atcmd_msg == atcommand_symbol && pc_isGM(sd) < info->level) || (*atcmd_msg == charcommand_symbol && pc_isGM(sd) < info->level2)) ) )diff --git a/rewrite/src/map/atcommand.h b/rewrite/src/map/atcommand.hindex 37ce87c..a4e1129 100644--- a/rewrite/src/map/atcommand.h+++ b/rewrite/src/map/[email protected]@ -45,4 +45,17 @@ char* msg_txt(int msg_number); int msg_config_read(const char* cfgName); void do_final_msg(void); +#define MAX_ATCMD_BINDINGS 100 ++// @commands (script based) +typedef struct Atcmd_Binding { + char command[50]; + char npc_event[50]; + int level; + int level2; +} Atcmd_Binding; + +struct Atcmd_Binding atcmd_binding[MAX_ATCMD_BINDINGS]; +struct Atcmd_Binding* get_atcommandbind_byname(const char* name);+ #endif /* _ATCOMMAND_H_ */diff --git a/rewrite/src/map/npc.c b/rewrite/src/map/npc.cindex eaf2fcf..db52cf3 100644--- a/rewrite/src/map/npc.c+++ b/rewrite/src/map/[email protected]@ -2752,6 +2752,69 @@ void npc_setclass(struct npc_data* nd, short class_) clif_spawn(&nd->bl);// fade in } +// @commands (script based) +int npc_do_atcmd_event(struct map_session_data *sd, const char *command, const char *message, const char *eventname)+{+ struct event_data *ev = (struct event_data *)strdb_get(ev_db, eventname);+ struct npc_data *nd;+ struct script_state *st;+ int i = 0, j = 0, k = 0;+ char *temp;++ nullpo_ret(sd);++ if(ev == NULL || (nd = ev->nd) == NULL) {+ ShowError("npc_event: event not found [%s]\n", eventname);+ return 0;+ }++ if(sd->npc_id != 0) { // Enqueue the event trigger.+ int i;+ ARR_FIND(0, MAX_EVENTQUEUE, i, sd->eventqueue[i][0] == '\0');+ if(i < MAX_EVENTQUEUE) {+ safestrncpy(sd->eventqueue[i],eventname,50); //Event enqueued.+ return 0;+ }++ ShowWarning("npc_event: player's event queue is full, can't add event '%s' !\n", eventname);+ return 1;+ }++ if(ev->nd->sc.option&OPTION_INVISIBLE) { // Disabled npc, shouldn't trigger event.+ npc_event_dequeue(sd);+ return 2;+ }++ st = script_alloc_state(ev->nd->u.scr.script, ev->pos, sd->bl.id, ev->nd->bl.id);+ setd_sub(st, NULL, "[email protected]_command$", 0, (void *)command, NULL);++ // split atcmd parameters based on spaces++ temp = (char *)aMalloc(strlen(message) + 1);++ for(i = 0; i < (strlen(message) + 1 ) && k < 127; i ++) {+ if( message[i] == ' ' || message[i] == '\0') {+ if(message[ (i - 1) ] == ' ') {+ continue; // To prevent "@atcmd [space][space][space]" and [email protected]_numparameters return 1 without any parameter.+ }+ temp[k] = '\0';+ k = 0;+ if( temp[0] != '\0' ) {+ setd_sub(st, NULL, "[email protected]_parameters$", j++, (void *)temp, NULL);+ }+ } else {+ temp[k] = message[i];+ k++;+ }+ }++ setd_sub(st, NULL, "[email protected]_numparameters", 0, (void *)__64BPRTSIZE(j), NULL);+ aFree(temp);++ run_script_main(st);+ return 0;+}+ /// Parses a function. /// function%TAB%script%TAB%<function name>%TAB%{<code>} static const char* npc_parse_function(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath)diff --git a/rewrite/src/map/npc.h b/rewrite/src/map/npc.hindex a512e30..9ce284a 100644--- a/rewrite/src/map/npc.h+++ b/rewrite/src/map/[email protected]@ -11,6 +11,13 @@ struct block_list; struct npc_data; struct view_data; +/* pointer size fix which fixes several gcc warnings */+// currently only used by bindatcmd script, so best to place here [15peaces]+#ifdef __64BIT__+ #define __64BPRTSIZE(y) (intptr)y+#else+ #define __64BPRTSIZE(y) y+#endif struct npc_timerevent_list { int timer,pos;@@ -163,4 +170,7 @@ int npc_cashshop_buylist(struct map_session_data* sd, int n, unsigned short* ite extern struct npc_data* fake_nd; +// @commands (script-based) +int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const char* message, const char* eventname);+ #endif /* _NPC_H_ */diff --git a/rewrite/src/map/script.c b/rewrite/src/map/script.cindex 48ea068..889bed4 100644--- a/rewrite/src/map/script.c+++ b/rewrite/src/map/[email protected]@ -3763,6 +3763,11 @@ int do_final_script() scriptlabel_db->destroy(scriptlabel_db,NULL); userfunc_db->destroy(userfunc_db,do_final_userfunc_sub); autobonus_db->destroy(autobonus_db, do_final_autobonus_sub);++ // @commands (script based) + // Clear bindings + memset(atcmd_binding,0,sizeof(atcmd_binding)); + if(sleep_db) { struct linkdb_node *n = (struct linkdb_node *)sleep_db; while(n) {@@ -15074,6 +15079,91 @@ BUILDIN_FUNC(opendressroom) return 0; } +/** + * @commands (script based) + **/ +BUILDIN_FUNC(bindatcmd) +{ + const char* atcmd; + const char* eventName; + int i = 0, level = 0, level2 = 0; ++ atcmd = script_getstr(st,2); + eventName = script_getstr(st,3); ++ if( script_hasdata(st,4) ) level = script_getnum(st,4); + if( script_hasdata(st,5) ) level2 = script_getnum(st,5); ++ // check if event is already binded + ARR_FIND(0, MAX_ATCMD_BINDINGS, i, strcmp(atcmd_binding[i].command,atcmd) == 0); + if( i < MAX_ATCMD_BINDINGS ) + { + safestrncpy(atcmd_binding[i].npc_event, eventName, 50); + atcmd_binding[i].level = level; + atcmd_binding[i].level2 = level2; + } + else + { // make new binding + ARR_FIND(0, MAX_ATCMD_BINDINGS, i, atcmd_binding[i].command[0] == '\0'); + if( i < MAX_ATCMD_BINDINGS ) + { + safestrncpy(atcmd_binding[i].command, atcmd, 50); + safestrncpy(atcmd_binding[i].npc_event, eventName, 50); + atcmd_binding[i].level = level; + atcmd_binding[i].level2 = level2; + } + } ++ return 0; +} + +BUILDIN_FUNC(unbindatcmd) +{ + const char* atcmd; + int i = 0; ++ atcmd = script_getstr(st, 2); ++ ARR_FIND(0, MAX_ATCMD_BINDINGS, i, strcmp(atcmd_binding[i].command, atcmd) == 0); + if( i < MAX_ATCMD_BINDINGS ) + memset(&atcmd_binding[i],0,sizeof(atcmd_binding[0])); ++ return 0; +} + +BUILDIN_FUNC(useatcmd) +{ + TBL_PC dummy_sd; + TBL_PC* sd; + int fd; + const char* cmd; ++ cmd = script_getstr(st,2); ++ if( st->rid ) + { + sd = script_rid2sd(st); + fd = sd->fd; + } + else + { // Use a dummy character. + sd = &dummy_sd; + fd = 0; + + memset(&dummy_sd, 0, sizeof(TBL_PC)); + if( st->oid ) + { + struct block_list* bl = map_id2bl(st->oid); + memcpy(&dummy_sd.bl, bl, sizeof(struct block_list)); + if( bl->type == BL_NPC ) + safestrncpy(dummy_sd.status.name, ((TBL_NPC*)bl)->name, NAME_LENGTH); + } + } ++ is_atcommand(fd, sd, cmd, 1); + return 0;+}+ // declarations that were supposed to be exported from npc_chat.c #ifdef PCRE_SUPPORT BUILDIN_FUNC(defpattern);@@ -15479,6 +15569,13 @@ struct script_function buildin_func[] = { BUILDIN_DEF(has_instance,"s?"), BUILDIN_DEF(instance_warpall,"sii?"), + /** + * @commands (script based) + **/ + BUILDIN_DEF(bindatcmd, "ss??"), + BUILDIN_DEF(unbindatcmd, "s"), + BUILDIN_DEF(useatcmd, "s"),+ //Quest Log System [Inkfish] BUILDIN_DEF(setquest, "i"), BUILDIN_DEF(erasequest, "i"),diff --git a/rewrite/src/map/script.h b/rewrite/src/map/script.hindex c272f2d..1f421c0 100644--- a/rewrite/src/map/script.h+++ b/rewrite/src/map/[email protected]@ -180,4 +180,7 @@ int add_str(const char* p); const char* get_str(int id); int script_reload(void); +// @commands (script based) +void setd_sub(struct script_state *st, TBL_PC *sd, const char *varname, int elem, void *value, struct linkdb_node **ref); + #endif /* _SCRIPT_H_ */ +// @commands (script based) +void setd_sub(struct script_state *st, TBL_PC *sd, const char *varname, int elem, void *value, struct linkdb_node **ref); + #endif /* _SCRIPT_H_ */
  2. hi guys, i know this is not the right forum to ask for 3ceam but i don't know any place that still cater 3ceam.. anyway my problem is regarding about the extended vending patch for 3ceam.. i've applied the patch of lilith ExtendedVendingSystem_1.7_3CeAM.patch i've successfully added the patch without having any error.. however after playing the game. and testing out the system im having problem regarding buying the item.. i can vend using the required item. ex. tcg card bronze coin and etc. however whenever i click the vend shop and buy the items being vend... i can buy the items without having the necessary item in my inventory like tcg card.. another thing also is if i have the tcg card, and i bought the item on the vend shop i can take the item but the tcg cad in my inventory is still the same amount.. and the item on the vend shop has been deducted but the seller does not get the tcg card from the buyer... please help.. i'm willing to pay for the solution... just message me please.. i'm begging T_T
  3. caspa

    Can attack poring only if wearing knife!

    its still doesnt work bro. T_T anyway thank you so much for your help T_T
  4. caspa

    Can attack poring only if wearing knife!

    ERROR again brother...
  5. caspa

    Can attack poring only if wearing knife!

    its from unit.c under from this src codes /*========================================== * 攻撃要求 * typeが1なら継続攻撃 *------------------------------------------*/ int unit_attack(struct block_list *src,int target_id,int continuous) { struct block_list *target; struct unit_data *ud; nullpo_ret(ud = unit_bl2ud(src)); target = map_id2bl(target_id); if( target==NULL || status_isdead(target) ) { unit_unattackable(src); return 1; } if( src->type == BL_PC ) { TBL_PC* sd = (TBL_PC*)src; if( target->type == BL_NPC ) { // monster npcs [Valaris] npc_click(sd,(TBL_NPC*)target); // submitted by leinsirk10 [Celest] return 0; } if( pc_is90overweight(sd) ) { // overweight - stop attacking unit_stop_attack(src); return 0; } if (pc_isequipped(sd, 23310)) { clif_displaymessage(sd->fd, "You can only attack a crystal while on mining form."); unit_stop_attack(src); return 0; } } BTW this is an eathena emulator hope u can help
  6. caspa

    Can attack poring only if wearing knife!

    i got this kind of error
  7. hi guys.. i have a code here that if i wear a knife i can't attack anyone or any monster if(pc_isequipped(sd, 1202)){ clif_displaymessage(sd->fd, "Can't attack while on Mount."); unit_stop_attack(src); return 0; } however i was wondering if its possible to create a similar code but instead of can't attack to anything at all, is if i wear a knife i can only attack the monster poring... this is for GOLD farming purposes! thank you guys!
  8. caspa

    IsEquipped more than 1 item

    i don't think there a 3ceam forum anymore..
  9. caspa

    IsEquipped more than 1 item

    it doesn't work... i'm getting so much error... i'm using 3ceam by the way..
  10. caspa

    IsEquipped more than 1 item

    hi guys, just a quick question. how do i add more items on the isequipped part on the code? i tried doing it like this but i got error = " if(pc_isequipped(sd, 23111,23112,23113,23114 and so on.... )){ " i don't want to do it by putting the same code below the first code with the item 23112 because the items goes beyond 23140 so i would just like to simplify it if possible. thx guys.. if(pc_isequipped(sd, 23111)){ clif_displaymessage(sd->fd, "Can't attack while on Mount."); unit_stop_attack(src); return 0; }
  11. can somebody explain to me why there is a 0 in this part delitem2 [email protected],1,1,getd("[email protected]_inf"[email protected]+"[4]"),0, and why there is a successive same getd ,getd("[email protected]_inf"[email protected]+"[0]"),getd("[email protected]_inf"[email protected]+"[1]"),getd("[email protected]_inf"[email protected]+"[2]"),getd("[email protected]_inf"[email protected]+"[3]"); after that? successrefitem [email protected]; set [email protected], [email protected] - 1; if([email protected] <= 0) close; set [email protected], 0; while ( getequiprefinerycnt([email protected]) >= [email protected] ) { for (set [email protected], 0; [email protected] < 4; set [email protected], [email protected] + 1) if (getequipcardid([email protected],[email protected]) != 0) setd "[email protected]_inf"[email protected]+"[[email protected]]", getequipcardid([email protected],[email protected]); setd "[email protected]_inf"[email protected]+"[4]", getequiprefinerycnt([email protected]); unequip [email protected]; delitem2 [email protected],1,1,getd("[email protected]_inf"[email protected]+"[4]"),0,getd("[email protected]_inf"[email protected]+"[0]"),getd("[email protected]_inf"[email protected]+"[1]"),getd("[email protected]_inf"[email protected]+"[2]"),getd("[email protected]_inf"[email protected]+"[3]"); equip [email protected]; set [email protected], [email protected] + 1; } if ([email protected]) { for (set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] + 1) { getitem2 [email protected],1,1,getd("[email protected]_inf"[email protected]+"[4]"),0,getd("[email protected]_inf"[email protected]+"[0]"),getd("[email protected]_inf"[email protected]+"[1]"),getd("[email protected]_inf"[email protected]+"[2]"),getd("[email protected]_inf"[email protected]+"[3]"); } } }
  12. HAHA i don't even know what [email protected] is being auto cleared and what variables mean in getinventorylist LOOOOL!! //===== eAthena Script ======================================= //= Refining NPCs //===== By: ================================================== //= Syrus22 (1.1) dafide18 (1.4) Skotlex (1.5), Kenedos (4.0) //===== Current Version: ===================================== //= 4.1 //===== Compatible With: ===================================== //= Any Athena Version //===== Description: ========================================= //= Refining NPCs and Metal Salesmen. //===== Additional Comments: ================================= //= 1.0 - by A bunch of people! //= Syrus22 - Completely redid the script using functions... also //= added the option for auto safe refining and multiple refining. //= 1.1 - Negative input bug fixed [Lupus] //= 1.2 - Added additional reparimen in morroc and payon. Added //= Christopher the blacksmith in Geffen. Edited some dialogue [kobra_k88] //= 1.3 - New Payon Locations [Darkchild] //= Corrected zeny subtraction thx to jpnmania77.[kobra_k88] //= 1.3a - Temporary corrected an exploit. Need to check sources //= to fully fix bug [Shinigami] //= Fixed repairman prices [shadowlady] //= Fixed bug that skips requirements thanks to sir_loon [massdriller] //= Fixed itemid error thanks to -Vitamin- [massdriller] //= 1.4 - check again item in refining procedure to avoid //= hacker that can change item [dafide18] //= 1.5 - Fixed crashing due to badly used callfunc's [Skotlex] // Lupus, don't rollback this important fix again! >.< //= 1.5a - Corrected an unneeded callfunc, fixed the anti-bot //= exploit ruining the safe refine loop. [Skotlex] //= 1.5b - Fixed Spelling mistakes. [Nexon] //= 1.6 - Replaced all breaks for ends as per the new script engine [Skotlex] //= 1.7 - Added Einbroch Refiners (Custom names ^^;) and a duplicated BS Shop. [Poki#3] //= 1.8 - Added Lighthalzen Refiners (Custom names again ^^;) [Poki#3] //= 1.8a - Fixed wrong indication thanks to NeoSaro [Lupus] //= 1.9 - Rewrote repairman, removed the Steel from repair cost [DracoRPG] //= 2.0 - Fixed missed equppment presence check. Thx2 Coltaro [Lupus] //= 2.0a - Added weight checks thanks to Neouni [Playtester] //= 2.0b - Fixed the names of Lighthalzen and Einbroch refiners thanks to Maud_Dib [Kargha] //= 2.1 - Removed Duplicates [Silent] //= 2.2 - Changed name from "Emvertacon" to "Emveretarcon". [Samuray22] // - Thanks to Barron-Monster. //= 2.2b - Changed name from "Pharacon" to "Phracon". [Samuray22] // - Thanks to Barron-Monster. //= 2.3 Corrected NPC names to fall within proper restrictions. [L0ne_W0lf] //= 2.4 Updated Refiner function. cleaner, and less dated. [L0ne_w0lf] //= 2.5 Rather large update to the refiner and merchants. [L0ne_W0lf] //= 2.6 Fixed a few bugs with creating pure stones. [L0ne_W0lf] //= 2.7 Refiner function accepts additional paramater. [L0ne_W0lf] //= 0 = No special features; 1 = new refining features //= Updated Repairmen and function. No longer shows menu. //= 2.7a A couple touch-ups to the repairman function. [L0ne_w0lf] //= 2.8 Changed the nonexistent variable [email protected]$ for getitemname([email protected]). (bugreport:2340) [Samuray22] //= 2.8 Added proper Blacksmith Supplier to Einroch. [L0ne_W0lf] //= Updated dated features comment to reflect new usage. //= 2.8a Small bugfix. (bugreport:2418) [Paradox924X] //= 2.9 Moved Morroc repairman to Morroc Ruins. [L0ne_W0lf] //= 4.0 Added the "Refine all Items in Inventory" function. [Kenedos] //= 4.0 Added the "Quick Refine" function. [Kenedos] //= 4.0 Fixed some other messages, and overall functions. [Kenedos] //= 4.1 Fixed the overweight Bug, other minor fixes //============================================================ //========================================================= // Christopher: Geffen Blacksmith //========================================================= geffen_in,110,172,0 script Christopher#1 63,{ mes "[Christopher Guillenrow]"; mes "Welcome to Christopher's Workshop. Ye can get all yer stuff for forging here. What business"; mes "brings ye to me?"; next; switch(select("Purchase Anvil:Purchase Forging Item:Purchase Metal:Purify Rough Ores:Cancel")) { case 1: mes "[Christopher Guillenrow]"; mes "A better Anvil gives ye a greeeater chance to make better weapons, ye know? But they'll cost ye more zeny. Just get it off yer chest and buy what fits your purposes best, laddy."; next; switch(select("Anvil - 30,000 zeny:Oridecon Anvil - 120,000 zeny:Golden Anvil - 300,000 zeny:Better Anvil than the others.:Cancel.")) { case 1: if (Zeny < 30000) { mes "[Christopher Guillenrow]"; mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye."; close; } getitem 986,1; // Anvil set Zeny,Zeny-30000; mes "[Christopher Guillenrow]"; mes "This is the cheapest one, but efficient enough to forge most items. Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need."; close; case 2: if (Zeny < 120000) { mes "[Christopher Guillenrow]"; mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye."; close; } getitem 987,1; // Oridecon_Anvil set Zeny,Zeny-120000; mes "[Christopher Guillenrow]"; mes "Aye, friend ye have an eye for the anvil. This must be the proper anvil for a Blacksmith, eh? Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need."; close; case 3: if (Zeny < 300000) { mes "[Christopher Guillenrow]"; mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye."; close; } getitem 988,1; // Golden_Anvil set Zeny,Zeny-300000; mes "[Christopher Guillenrow]"; mes "This one is the best among all me stuffs in me workshop! With this, ye can rule the Blacksmith world! Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need."; close; case 4: mes "[Christopher Guillenrow]"; mes "Well, sorry. But I don't have anythin' harder' than the Golden Anvil."; next; mes "[Christopher Guillenrow]"; mes "Me thinks 'Ringgel,' the Legendary Anvil Maker would have one. But, I don't think ye can find him, though he be somewhere in this world."; close; case 5: mes "[Christopher Guillenrow]"; mes "Okay, feel free to come anytime, whenever ye need. Fare ye well."; close; } case 2: mes "[Christopher Guillenrow]"; mes "A respectable blacksmith uses fine tools. Ye can become one o'those with me Stuff. Choose anything ye want."; next; switch(select("Mini-Furnace - 150 zeny:Iron Hammer - 1000 zeny:Golden Hammer - 3000 zeny:Oridecon Hammer - 5000 zeny:Cancel.")) { case 1: mes "[Christopher Guillenrow]"; mes "It's a much needed tool fer refining metal! So, How many do ye wish to buy? If ye want to quit, just type the number '0.'"; next; while(1) { input [email protected]; if ([email protected] == 0) { mes "[Christopher Guillenrow]"; mes "Aye, the deal is canceled. Fare ye well."; close; } else if (([email protected] < 0) || ([email protected] > 500)) { mes "[Christopher Guillenrow]"; mes "Ye can buy 500, er less."; next; } else { break; } } set [email protected],[email protected] * 150; if (Zeny < [email protected]) { mes "[Christopher Guillenrow]"; mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye."; close; } if (checkweight(612,[email protected]) == 0) { mes "[Christopher Guillenrow]"; mes "Ye look like you don't got enough room in yer inventory. Put some stuff into your Kafra Storage, why don't ye?"; close; } getitem 612,[email protected]; // Portable_Furnace set Zeny,[email protected]; mes "[Christopher Guillenrow]"; mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need."; close; case 2: if (Zeny < 1000) { mes "[Christopher Guillenrow]"; mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye."; close; } getitem 613,1; // Iron_Hammer set Zeny,Zeny-1000; mes "[Christopher Guillenrow]"; mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need."; close; case 3: if (Zeny < 3000) { mes "[Christopher Guillenrow]"; mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye."; close; } getitem 614,1; // Golden_Hammer set Zeny,Zeny-3000; mes "[Christopher Guillenrow]"; mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need."; close; case 4: if (Zeny < 5000) { mes "[Christopher Guillenrow]"; mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye."; close; } getitem 615,1; // Oridecon_Hammer set Zeny,Zeny-5000; mes "[Christopher Guillenrow]"; mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need."; close; case 5: mes "[Christopher Guillenrow]"; mes "Feel free to come anytime, whenever ye need. Fare ye well."; close; } case 3: mes "[Christopher Guillenrow]"; mes "I prepare every Metal, and only the high quality ones o'course. Now then, which one do ye need?"; next; switch(select("Phracon - 200z.:Emveretarcon - 1000z.:Cancel.")) { case 1: mes "[Christopher Guillenrow]"; mes "So, How many do ye wish to buy? If ye dont want anything, just type the number as '0.'"; next; while(1) { input [email protected]; if ([email protected] == 0) { mes "[Christopher Guillenrow]"; mes "Deal has"; mes "been canceled."; mes "Fare ye well."; close; } else if (([email protected] < 0) || ([email protected] > 500)) { mes "[Christopher Guillenrow]"; mes "Ye can buy 500, er less."; next; } else { break; } } set [email protected],[email protected] * 200; if (Zeny < [email protected]) { mes "[Christopher Guillenrow]"; mes "Ye don't have enough money. Ye know I can't sell this at a lower price... You know how the wifey nags about Zeny."; close; } if (checkweight(1010,[email protected]) == 0) { mes "[Christopher Guillenrow]"; mes "Ye look like you don't have the room to carry anythin' new. Why don't ye put some things into Kafra Storage n' come back."; close; } getitem 1010,[email protected]; // Phracon set Zeny,[email protected]; mes "[Christopher Guillenrow]"; mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need."; close; case 2: mes "[Christopher Guillenrow]"; mes "So, how many do ye wish to buy? If ye dont want anything at all, just type the number as '0.'"; next; while(1) { input [email protected]; if ([email protected] == 0) { mes "[Christopher Guillenrow]"; mes "Deal has"; mes "been canceled."; mes "Fare ye well."; close; } else if (([email protected] < 0) || ([email protected] > 500)) { mes "[Christopher Guillenrow]"; mes "Ye can buy 500, er less."; next; } else { break; } } set [email protected],[email protected] * 1000; if (Zeny < [email protected]) { mes "[Christopher Guillenrow]"; mes "I don't think I can let ye have this with the zeny ye have. I can't lose me money because of ye."; close; } if (checkweight(1011,[email protected]) == 0) { mes "[Christopher Guillenrow]"; mes "Me friend... Seems to me ye don't have Inventory space. Why doncha put some things into Kafra Storage first?"; close; } getitem 1011,[email protected]; // Emveretarcon set Zeny,[email protected]; mes "[Christopher Guillenrow]"; mes "Thank ye fer shopping at me workshop. Feel free to come anytime, whenever ye need, whenever ye want."; close; case 3: mes "[Christopher Guillenrow]"; mes "Feel free to come anytime, whenever ye need. Fare ye well."; close; } case 4: mes "[Christopher Guillenrow]"; mes "I can purify yer Oridecon and Elunium. I make a refined Ore out of 5 o'each rough ones. Well... Which one do ye want to make?"; next; switch(select("Make Oridecon:Make Elunium:Cancel.")) { case 1: if (countitem(756) < 5) { mes "[Christopher Guillenrow]"; mes "I told ye, I need 5 o'the rough Oridecons fer one Oridecon."; close; } else { delitem 756,5; //Oridecon_Stone getitem 984,1; // Oridecon mes "[Christopher Guillenrow]"; mes "Here's an Oridecon fer ye. Ye will be always welcome here, I'll be waitin' for ye."; close; } case 2: if (countitem(757) < 5) { mes "[Christopher Guillenrow]"; mes "I told ye, I need 5 rough Eluniums fer one Elunium."; close; } else { delitem 757,5; //Elunium_Stone getitem 985,1; // Elunium mes "[Christopher Guillenrow]"; mes "Arrr, here's yer Elunium. Yer business is always welcome here, so feel free to come again."; close; } case 3: mes "[Christopher Guillenrow]"; mes "Feel free to come anytime, whenever ye need. Fare ye well."; close; } case 5: mes "[Christopher Guillenrow]"; mes "Feel free to come anytime, whenever ye need and whenever ye want. Fare ye well."; close; } } //========================================================= // Paul Spanner: Einbroch Blacksmith Supplier //========================================================= ein_in01,38,29,0 script Paul Spanner 63,{ if (checkweight(1201,1) == 0) { mes "- Wait a minute !! -"; mes "- Currently you're carrying -"; mes "- too many items with you. -"; mes "- Please try again -"; mes "- after you loose some weight. -"; close; } mes "[Paul Spanner]"; mes "Welcome, my friend."; mes "In my shop, you will find everything that you need in forging."; mes "Tell me what you need."; next; switch(select("Purchase Anvil.:Purchase Forging Items.:Purchase Metal.:Process Ores.:Quit.")) { case 1: mes "[Paul Spanner]"; mes "Anvil is the most necessary item for Blacksmiths."; mes "Since you will use an Anvil more than once, you'd better buy a nice one."; next; switch(select("Anvil - 30,000z.:Oridecon Anvil - 120,000z.:Golden Anvil - 300,000z.:I need a better anvil.:Cancel.")) { case 1: if (zeny < 30000) { mes "[Paul Spanner]"; mes "With that much of money, you cannot even buy a toy anvil!"; close; } getitem 986,1; //Anvil set zeny,zeny-30000; mes "[Paul Spanner]"; mes "It is the cheapest anvil which has the most basic ability."; mes "Thank you for using my shop. If you need anything, just let me know."; close; case 2: if (zeny < 120000) { mes "[Paul Spanner]"; mes "With that much of money, you cannot even buy a toy anvil!"; close; } getitem 987,1; //Oridecon_Anvil set zeny,zeny-120000; mes "[Paul Spanner]"; mes "Ah, you have an eye for anvil. A Blacksmith needs an anvil at least as good as this."; mes "Thank you for using my shop. If you need anything, just let me know."; close; case 3: if (zeny < 300000) { mes "[Paul Spanner]"; mes "With that much of money, you cannot even buy a toy anvil!"; close; } getitem 988,1; //Golden_Anvil set zeny,zeny-300000; mes "[Paul Spanner]"; mes "I can tell your ambition to become a good Blacksmith just by looking at you to choose this Golden Anvil!"; mes "This anvil will surely aid you in creating the best weapons."; close; case 4: mes "[Paul Spanner]"; mes "I am sorry, but I do not sell better anvils than Golden Anvil."; mes "Unless you find the legendary anvil of 'Linggell', I don't think that you could find better one than Golden Anvil in any other places."; close; case 5: mes "[Paul Spanner]"; mes "If you need anything, just let me know."; close; } case 2: mes "[Paul Spanner]"; mes "You need various materials to process ores and to forge weapons."; mes "I have everything that you need. Take a look."; next; switch(select("Mini Furnace - 150z.:Iron Hammer - 1,000z.:Golden Hammer - 3,000z.:Oridecon Hammer - 5,000z.:Cancel.")) { case 1: set [email protected],612; set [email protected]_cost,150; set [email protected]_weight,200; mes "[Paul Spanner]"; mes "You definately need this furnce to process ores!"; next; break; case 2: set [email protected],613; set [email protected]_cost,1000; set [email protected]_weight,200; break; case 3: set [email protected],614; set [email protected]_cost,3000; set [email protected]_weight,300; break; case 4: set [email protected],615; set [email protected]_cost,5000; set [email protected]_weight,400; break; case 5: mes "[Paul Spanner]"; mes "If you need anything, just let me know."; close; } mes "[Paul Spanner]"; mes "So, how many do you need? If you want to cancel the trade, enter '0'."; next; while(1) { input [email protected]; if ([email protected] == 0) { mes "[Paul Spanner]"; mes "You have canceled the trade. If you need anything, just let me know."; close; } else if (([email protected] < 0) || ([email protected] > 500)) { mes "[Paul Spanner]"; mes "You can only buy 500 or less at a time."; next; } else { break; } } set [email protected],[email protected] * [email protected]_cost; if (zeny < [email protected]) { mes "[Paul Spanner]"; mes "You don't have enough money. Sorry, I cannot sell them at a loss."; close; } if (checkweight([email protected],[email protected]) == 0) { mes "[Paul Spanner]"; mes "Hey, you look pale. Why don't you go lighten your weight first."; close; } set zeny,[email protected]; getitem [email protected],[email protected]; mes "[Paul Spanner]"; mes "Thank you for using my shop. If you need anything, just let me know."; close; case 3: mes "[Paul Spanner]"; mes "I have high quality metal."; mes "So, which metal would you like to buy?"; next; switch(select("Phracon - 200z.:Emveretarcon - 1,000z.:Quit.")) { case 1: set [email protected],1010; set [email protected]_price,200; break; case 2: set [email protected],1011; set [email protected]_price,1000; break; case 3: mes "[Paul Spanner]"; mes "If you need anything, just let me know."; close; } mes "[Paul Spanner]"; mes "So, how many of them do you need? If you want to cancel the trade, enter '0'."; next; while(1) { input [email protected]; if ([email protected] == 0) { mes "[Paul Spanner]"; mes "The trade has been canceled. If you need anything, just let me know."; close; } else if (([email protected] < 0) || ([email protected] > 500)) { mes "[Paul Spanner]"; mes "You can buy 500 or less at a time."; next; } else { break; } } set [email protected],[email protected] * [email protected]_price; if (zeny < [email protected]) { mes "[Paul Spanner]"; mes "You don't have enough money. Sorry, I cannot sell them at a loss."; close; } if (checkweight([email protected],[email protected]) == 0) { mes "[Paul Spanner]"; mes "Hey, you look pale. Why don't you go lighten your weight first?"; close; } getitem [email protected],[email protected]; set zeny,[email protected]; mes "[Paul Spanner]"; mes "Thank you for using my shop. If you need anything, just let me know."; close; case 4: mes "[Paul Spanner]"; mes "I can process Oridecon and Elunium for you."; mes "You need 5 ores to process them into one Oridecon or Elunium."; mes "So, which one do you want to process?"; switch(select("Oridecon:Elunium:Quit.")) { case 1: if (countitem(756) < 5) { mes "[Paul Spanner]"; mes "You need 5 ores to process them into one pure Oridecon."; close; } else { delitem 756,5; //Oridecon_Stone getitem 984,1; //Oridecon mes "[Paul Spanner]"; mes "There you go. Thank you for using my service."; close; } case 2: if (countitem(757) < 5) { mes "[Paul Spanner]"; mes "You need 5 ores to process them into one pure Elunium."; close; } else { delitem 757,5; //Elunium_Stone getitem 985,1; //Elunium mes "[Paul Spanner]"; mes "There you go. Thank you for using my service."; close; } case 3: mes "[Paul Spanner]"; mes "If you need anything, just let me know."; close; } case 5: mes "[Paul Spanner]"; mes "If you need anything, just let me know."; close; } } //===================================================================================== // Weapon/Armor Refiners //===================================================================================== prt_in,63,60,4 script Hollengrhen 85,{ callfunc "refinemain","Hollengrhen",1; end; } morocc_in,73,38,4 script Aragham 99,{ callfunc "refinemain","Aragham",1; end; } payon,144,173,4 script Antonio 88,{ callfunc "refinemain","Antonio",1; end; } alberta_in,28,58,4 script Fredrik 85,{ callfunc "refinemain","Fredrik",1; end; } yuno_in01,164,26,6 script Disturb 88,{ callfunc "refinemain","Disturb",1; end; } ein_in01,24,87,6 script Manthasman 826,{ callfunc "refinemain","Manthasman Pruhag",1; end; } lhz_in02,282,20,7 script Fulerr 869,{ callfunc "refinemain","Fulerr",1; end; } //============================================================ //= Main Refiner Function //============================================================ //= To allow auto safe refining/multiple refining set the //= second argument to '1' in the function call. //============================================================ function script refinemain { set [email protected],getarg(1); mes "[" + getarg(0) + "]"; mes "I'm the Armsmith."; mes "I can refine all kinds of weapons, armor and equipment, so let me"; mes "know what you want me to refine."; next; setarray [email protected]$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3"; set [email protected]$,""; for( set [email protected],1; [email protected] <= 10; set [email protected],[email protected]+1 ) { if( getequipisequiped([email protected]) ) set [email protected]$, [email protected]$ + [email protected]$[[email protected]] + "-" + "[" + getequipname([email protected]) + "]"; set [email protected]$, [email protected]$ + ":"; } if (!M_quickref) set [email protected]$, [email protected]$ + "^0000FFTurn ^009933ON^0000FF Quick Refining^000000"; else set [email protected]$, [email protected]$ + "^0000FFTurn ^FF0000OFF^0000FF Quick Refining^000000"; set [email protected],select([email protected]$); if ([email protected] == [email protected] ) { mes "[" + getarg(0) + "]"; if (!M_quickref) { mes "The ^0000FFQuick Refine^000000 Function has been Turned ^009933ON^000000"; set M_quickref, 1; } else { mes "The ^0000FFQuick Refine^000000 Function has been Turned ^FF0000OFF^000000"; set M_quickref, 0; } close; } if(!getequipisequiped([email protected])) { mes "[" + getarg(0) + "]"; mes "You're not wearing"; mes "anything there that"; mes "I can refine."; emotion 6; close; } //Check if the item is refinable... if(!getequipisenableref([email protected])) { mes "[" + getarg(0) + "]"; mes "I don't think I can"; mes "refine this item at all..."; close; } //Check if the item is identified... (Don't know why this is in here... but kept it anyway) if(!getequipisidentify([email protected])) { mes "[" + getarg(0) + "]"; mes "You can't refine this"; mes "if you haven't appraised"; mes "it first. Make sure your"; mes "stuff is identified before"; mes "I can refine it."; close; } //Check to see if the items is already +10 if(getequiprefinerycnt([email protected]) >= 10) { mes "[" + getarg(0) + "]"; mes "I can't refine this"; mes "any more. This is as"; mes "refined as it gets!"; close; } set [email protected], getequipid([email protected]); // save id of the item set [email protected], getequiprefinerycnt([email protected]); //save refinery count switch(getequipweaponlv([email protected])){ // ----------- Refine Prices, Materials and Safe Refines ---------- // case 0: //Refine Armor set [email protected],2000; set [email protected],985; set [email protected],4; break; case 1: //Refine Level 1 Weapon set [email protected],50; set [email protected],1010; set [email protected],7; break; case 2: //Refine Level 2 Weapon set [email protected],200; set [email protected],1011; set [email protected],6; break; case 3: //Refine Level 3 Weapon set [email protected],5000; set [email protected],984; set [email protected],5; break; case 4: //Refine Level 4 Weapon set [email protected],20000; set [email protected],984; set [email protected],4; break; case 5: //Refine other stuff? set [email protected],2000; set [email protected],985; set [email protected],4; break; // ----------------------------------------------------------------- // } if([email protected] != 1) { mes "[" + getarg(0) + "]"; mes "To refine this I need"; mes "one ^003366"+getitemname([email protected])+"^000000 and"; mes "a service fee of " + [email protected] + " Zeny."; mes "Do you really wish to continue?"; next; if(select("Yes:No") == 2){ mes "[" + getarg(0) + "]"; mes "Yeah..."; mes "There's no need to"; mes "rush. Take your time."; close; } if(getequippercentrefinery([email protected]) < 100) { mes "[" + getarg(0) + "]"; mes "Oh no! If I continue to"; mes "refine this, there's a risk it could"; switch([email protected]) { case 985: mes "be destroyed! That means that ^FF0000this equipment^000000, and ^FF0000any cards^000000 or special properties added to this armor, ^FF0000will be gone^000000."; break; default: mes "be destroyed, and you'd ^FF0000lose the weapon^000000, any ^FF0000cards in the weapon^000000,"; mes "or any added special properties."; break; } next; mes "["+getarg(0)+"]"; mes "I can't make it any clearer."; mes "Once a weapon is destroyed,"; mes "there's no getting it back."; mes "You really have a chance to"; mes "^FF0000lose this weapon^000000 forever."; mes "Do you still want to refine?"; next; if(select("Yes:No") == 2){ mes "[" + getarg(0) + "]"; mes "I completely agree..."; mes "I might be a great refiner, but sometimes even I make mistakes."; close; } } if((countitem([email protected]) < 1) || (Zeny < [email protected])) { mes "[" + getarg(0) + "]"; mes "You don't seem to have"; mes "enough Zeny or "+getitemname([email protected])+"..."; mes "Go get some more. I'll be"; mes "here all day if you need me."; close; } set Zeny,[email protected]; delitem [email protected],1; if(getequipisequiped([email protected]) == 0) { // hacker has removed the item (not changed, why?) mes "[" + getarg(0) + "]"; mes "Look here... you don't have any Items on..."; close; } if(getequiprefinerycnt([email protected]) != [email protected] || getequipid([email protected]) != [email protected]) { // hacker has changed the item next; mes "[" + getarg(0) + "]"; mes "You changed your equipment!"; mes "You filthy scum!!!"; next; atcommand "@nuke "+strcharinfo(0); end; } if(getequippercentrefinery([email protected]) <= rand(100)) { failedrefitem [email protected]; mes "[" + getarg(0) + "]"; set [email protected],rand(1,5); if ([email protected] == 1) { Emotion e_cash; } else { Emotion e_swt; } set [email protected],rand(1,3); if ([email protected] == 1) { mes "OH! MY GOD!"; mes "Damn it! Not again!"; mes "I'm terribly sorry, but you know practice does make perfect."; mes "Um, right? Heh heh..."; } else if([email protected] == 2) { mes "Nooooooo!"; mes "It broke!"; mes "I-I'm sorry!"; } else { mes "Crap!"; mes "It couldn't take"; mes "much more tempering!"; mes "Sorry about this..."; } close; } mes "["+getarg(0)+"]"; successrefitem [email protected]; Emotion e_heh; set [email protected],rand(1,3); if ([email protected] == 1) { mes "Perfect!"; mes "Heh heh!"; mes "Once again,"; mes "flawless work"; mes "from the master~"; } else if([email protected] == 2) { mes "Success...!"; mes "Yet again, my amazing"; mes "talent truly dazzles"; mes "and shines today."; } else { mes "Heh heh!"; mes "I'm all done."; mes "No doubt, my work is"; mes "to your satisfaction."; mes "Sheer, utter perfection~"; } close; } // New Refining Functions ======================== if(getequiprefinerycnt([email protected]) < [email protected]) { mes "[" + getarg(0) + "]"; mes "Alright, would you like to refine to safe limit, or pick a number of refines?"; next; set [email protected],select("Safe Limit:Choose Number:Nevermind"); } else set [email protected], 2; switch([email protected]){ case 1: mes "["+strnpcinfo(1)+"]"; mes "Alright, I can do that for ALL ^0000FF"+getequipname([email protected])+"^000000 you have in your inventory, or just the one currently equipped."; next; if (select ("Currently Equipped:All Items in Inventory") == 2) set [email protected], 1; set [email protected],[email protected] - getequiprefinerycnt([email protected]); break; case 2: next; mes "[" + getarg(0) + "]"; mes "So how many times would you like me to refine your item?"; next; input [email protected]; set [email protected],[email protected] + getequiprefinerycnt([email protected]); if ([email protected] < 1 || [email protected] > 10) { mes "[" + getarg(0) + "]"; mes "I can't refine this item that many times."; close; } mes "["+strnpcinfo(1)+"]"; mes "Alright, I can do it for only your currently equipped item, or ALL ^0000FF"+getequipname([email protected])+"^000000 you have in your inventory. What would you like to do?"; next; if (select ("Currently Equipped:All Items in Inventory") == 2) set [email protected], 1; if ([email protected]) set [email protected], getequiprefinerycnt([email protected]) + [email protected]; if ( ([email protected]) && ([email protected] < [email protected]) ) break; mes "[" + getarg(0) + "]"; if ( [email protected]) mes "This will try to refine the equipment " + ([email protected] - [email protected]) + " times past the safe limit. Your equipment may be destroyed... is that ok?"; else mes "Remember this will attempt to refine to ^009933+"[email protected]+"^000000 ^FF0000ALL^000000 the ^0000FF"+getequipname([email protected])+"^000000 items you have in your inventory!!"; next; if(select("Accept","Reject") == 2){ mes "[" + getarg(0) + "]"; mes "Smart kid...."; close; } break; case 3: next; mes "[" + getarg(0) + "]"; mes "You said so..Hmm so be it..."; close; } if ([email protected]) { deletearray @inventorylist_refine; deletearray @inventorylist_id; getinventorylist; set [email protected], 0; for (set [email protected], 0; [email protected] < @inventorylist_count; set [email protected], [email protected] + 1) { if ( @inventorylist_id[[email protected]] == getequipid([email protected]) ) { set [email protected][[email protected]], @inventorylist_refine[[email protected]]; set [email protected], [email protected] + 1; } } deletearray @inventorylist_refine; deletearray @inventorylist_id; } set [email protected], 0; if ( [email protected] ) set [email protected],[email protected] * [email protected]; else { set [email protected], 0; for ( set [email protected], 0; [email protected] < [email protected] ; set [email protected], [email protected] + 1) { if ( [email protected][[email protected]] < [email protected] ) { set [email protected], [email protected] + ( ( [email protected] - [email protected][[email protected]] ) * [email protected] ); set [email protected], [email protected] + ([email protected] - [email protected][[email protected]]); } } deletearray [email protected]; } mes "[" + getarg(0) + "]"; if ( [email protected] ) mes "That will cost you " + [email protected] + " " + getitemname([email protected]) + " and " + [email protected] + " Zeny. Is that ok?"; else mes "That will cost you " + [email protected] + " " + getitemname([email protected]) + " and " + [email protected] + " Zeny. Is that ok?"; next; if(select("Yes","No...") == 2){ mes "[" + getarg(0) + "]"; mes "You said so..Hmm so be it..."; close; } if ( [email protected] ) { if(countitem([email protected]) < [email protected] || Zeny < [email protected]) { mes "[" + getarg(0) + "]"; mes "Is that all you got? Unfortunately I can't work for you at a lower price. Try putting yourself in my shoes."; close; } set Zeny,Zeny - [email protected]; delitem [email protected],[email protected]; while([email protected]){ if (getequipisequiped([email protected]) == 0) { mes "[" + getarg(0) + "]"; mes "Look here... you don't have any Items on..."; close; } if (checkweight([email protected],1) == 0 ) { next; mes "[" + getarg(0) + "]"; mes "Hey you are overweight, try storing some items first."; close; } if (getequipid([email protected]) != [email protected] || ([email protected] == 1 && getequippercentrefinery([email protected]) < 100)) { next; mes "[" + getarg(0) + "]"; mes "You changed your equipment!"; mes "You filthy scum!!!"; next; atcommand "@nuke "+strcharinfo(0); end; } mes "Clang, clang!!!"; if([email protected] == 2 && getequippercentrefinery([email protected]) <= rand(100)) { failedrefitem [email protected]; emotion 23; mes "[" + getarg(0) + "]"; mes "WAHHHH!!! I'm so sorry... I warned you this could happen..."; set [email protected],[email protected] - 1; if([email protected] == 0) close; mes "Here's the unused Zeny and Material back..."; getitem [email protected],[email protected]; set [email protected],[email protected] * [email protected]; set Zeny,Zeny + [email protected]; close; } successrefitem [email protected]; emotion 21; set [email protected],[email protected] - 1; next; } } else { if ( getbrokenid ([email protected]) ) { mes "[" + getarg(0) + "]"; mes "Sorry but I can't work to refine an equipment if you have another of the same kind of item that's not repaired in your inventory."; close; } if(countitem([email protected]) < [email protected] || Zeny < [email protected]) { mes "[" + getarg(0) + "]"; mes "Is that all you got? Unfortunately I can't work for you at a lower price. Try putting yourself in my shoes."; close; } set [email protected], 0; while(1){ for (set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] + 1) deletearray getd("[email protected]_inf"[email protected]); if ( getequipisequiped([email protected]) == 0 ) { equip [email protected]; set [email protected], 0; while ( getequiprefinerycnt([email protected]) >= [email protected] ) { for (set [email protected], 0; [email protected] < 4; set [email protected], [email protected] + 1) if (getequipcardid([email protected],[email protected]) != 0) setd "[email protected]_inf"[email protected]+"[[email protected]]", getequipcardid([email protected],[email protected]); setd "[email protected]_inf"[email protected]+"[4]", getequiprefinerycnt([email protected]); unequip [email protected]; delitem2 [email protected],1,1,getd("[email protected]_inf"[email protected]+"[4]"),0,getd("[email protected]_inf"[email protected]+"[0]"), getd("[email protected]_inf"[email protected]+"[1]"),getd("[email protected]_inf"[email protected]+"[2]"),getd("[email protected]_inf"[email protected]+"[3]"); equip [email protected]; set [email protected], [email protected] + 1; } if ([email protected]) { for (set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] + 1) { getitem2 [email protected],1,1,getd("[email protected]_inf"[email protected]+"[4]"),0,getd("[email protected]_inf"[email protected]+"[0]"), getd("[email protected]_inf"[email protected]+"[1]"),getd("[email protected]_inf"[email protected]+"[2]"),getd("[email protected]_inf"[email protected]+"[3]"); } } for (set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] + 1) deletearray getd("[email protected]_inf"[email protected]); } if (checkweight([email protected],1) == 0 ) { next; mes "[" + getarg(0) + "]"; mes "Hey you are overweight, try storing some items first."; close; } if ( (getequipid([email protected]) != [email protected]) || ([email protected] == 1 && getequippercentrefinery([email protected]) < 100)) { next; mes "[" + getarg(0) + "]"; mes "You changed your equipment!"; mes "You filthy scum!!!"; next; atcommand "@nuke "+strcharinfo(0); end; } if (getequiprefinerycnt([email protected]) >= 10) { next; mes "[" + getarg(0) + "]"; mes "You changed your equipment!"; mes "You filthy scum!!!"; next; atcommand "@nuke "+strcharinfo(0); end; } if (!M_quickref) { set [email protected], rand(1,4); if ([email protected] == 1) mes "cLanG, clang ClAng!"; else if ([email protected] == 2) mes "ClaNg ClAng claNg!"; else if ([email protected] == 3) mes "clANg Clang CLanG!"; else if ([email protected] == 4) mes "CLang cLanG cLANg!"; } else if ([email protected]) { mes "ClAng ClanG ClanG Clangg CLAgn Cnaglnac CLnacnlnagCALNGa ClangaglnaCLAnagacalNCagaCLNAangalncalclanCLANGlancLANgacln!!!"; mes "^FF0000(Please do not Log-Off while in this process)^000000"; set [email protected], 1; } set Zeny, Zeny - [email protected]; delitem [email protected], 1; if(getequippercentrefinery([email protected]) <= rand(100)) { set [email protected], [email protected] - getequiprefinerycnt([email protected]) ; set [email protected], [email protected] - [email protected] ; failedrefitem [email protected]; if([email protected] <= 0) close; } else { successrefitem [email protected]; set [email protected], [email protected] - 1; if([email protected] <= 0) close; set [email protected], 0; while ( getequiprefinerycnt([email protected]) >= [email protected] ) { for (set [email protected], 0; [email protected] < 4; set [email protected], [email protected] + 1) if (getequipcardid([email protected],[email protected]) != 0) setd "[email protected]_inf"[email protected]+"[[email protected]]", getequipcardid([email protected],[email protected]); setd "[email protected]_inf"[email protected]+"[4]", getequiprefinerycnt([email protected]); unequip [email protected]; delitem2 [email protected],1,1,getd("[email protected]_inf"[email protected]+"[4]"),0,getd("[email protected]_inf"[email protected]+"[0]"), getd("[email protected]_inf"[email protected]+"[1]"),getd("[email protected]_inf"[email protected]+"[2]"),getd("[email protected]_inf"[email protected]+"[3]"); equip [email protected]; set [email protected], [email protected] + 1; } if ([email protected]) { for (set [email protected], 0; [email protected] < [email protected]; set [email protected], [email protected] + 1) { getitem2 [email protected],1,1,getd("[email protected]_inf"[email protected]+"[4]"),0,getd("[email protected]_inf"[email protected]+"[0]"), getd("[email protected]_inf"[email protected]+"[1]"),getd("[email protected]_inf"[email protected]+"[2]"),getd("[email protected]_inf"[email protected]+"[3]"); } } } if (!M_quickref) next; else { set [email protected], [email protected] + 1; sleep2 300; } } } mes "[" + getarg(0) + "]"; mes "All finished... Come again soon."; close; } //============================================================================== // Material Salesmen //============================================================================== prt_in,56,69,4 script Vurewell 86,{ callfunc "phramain","Vurewell"; end; } payon,145,178,4 script Begnahd 88,{ callfunc "phramain","Begnahd"; end; } morocc_in,65,37,4 script Sade 99,{ callfunc "phramain","Sade"; end; } alberta_in,18,59,5 script Kahlamanlith 86,{ callfunc "phramain","Kahlamanlith"; end; } yuno_in01,171,26,6 script Dillemat 88,{ callfunc "phramain","Dillemat"; end; } ein_in01,15,87,7 script Tirehaus 86,{ callfunc "phramain","Tirehaus"; end; } lhz_in02,278,24,3 script Krugg 86,{ callfunc "phramain","Krugg"; end; } //============================================================ //= Material Salesmen Functions //============================================================ function script phramain { if (checkweight(1201,1) == 0) { mes "- Wait a minute !! -"; mes "- Currently you're carrying -"; mes "- too many items with you. -"; mes "- Please try again -"; mes "- after you loose some weight. -"; close; } mes "[" + getarg(0) + "]"; mes "I have ^777777Phracons^000000 and ^777777Emveretarcons^000000 for sale."; mes "I can also trade some more unique materials such as ^0000FFBradiums^000000 and ^0000FFKaluniums^000000"; next; switch(select("Phracon - 200 Zeny:Emveretarcon - 1000 Zeny:Trade Elunium->Kalunium:Trade Oridecon->Bradium:Trade Refined Bradium->Bradium:Trade Tiny Bradium->Bradium:Trade Bradium->Oridecon:Trade Kalunium->Elunium:Ask about other Metals")) { case 1: set [email protected],1010; set [email protected],200; set [email protected], 1; break; case 2: set [email protected],1011; set [email protected],1000; set [email protected], 1; break; case 3: // Elunium -> Kalunium set [email protected], 3; // Material 1 Quantity Cost set [email protected], 985; // Material 1 ID set [email protected], 50000; // Trade Cost set [email protected], 6223; // Material 2 ID set [email protected], 1; // Material 2 Quantity Received set [email protected], 0; // Leave this alone break; case 4: // Oridecon -> Bradium set [email protected], 3; // Material 1 Quantity Cost set [email protected], 984; // Material 1 ID set [email protected], 80000; // Trade Cost set [email protected], 6224; // Material 2 ID set [email protected], 1; // Material 2 Quantity Received set [email protected], 0; // Leave this alone break; case 5: // Refined Bradium -> Bradium set [email protected], 1; // Material 1 Quantity Cost set [email protected], 6090; // Material 1 ID set [email protected], 60000; // Trade Cost set [email protected], 6224; // Material 2 ID set [email protected], 2; // Material 2 Quantity Received set [email protected], 0; // Leave this alone break; case 6: // Tiny Bradium -> Bradium set [email protected], 10; // Material 1 Quantity Cost set [email protected], 6319; // Material 1 ID set [email protected], 40000; // Trade Cost set [email protected], 6224; // Material 2 ID set [email protected], 1; // Material 2 Quantity Received set [email protected], 0; // Leave this alone break; case 7: // Bradium -> Oridecon set [email protected], 1; // Material 1 Quantity Cost set [email protected], 6224; // Material 1 ID set [email protected], 20000; // Trade Cost set [email protected], 984; // Material 2 ID set [email protected], 3; // Material 2 Quantity Received set [email protected], 0; // Leave this alone break; case 8: // Kalunium -> Elunium set [email protected], 1; // Material 1 Quantity Cost set [email protected], 6223; // Material 1 ID set [email protected], 30000; // Trade Cost set [email protected], 985; // Material 2 ID set [email protected], 3; // Material 2 Quantity Received set [email protected], 0; // Leave this alone break; default: mes "[" + getarg(0) + "]"; mes "Other metals?"; mes "Have you heard about the ^009900Unique Power Stones^000000? They are pretty damn powerfull."; mes "I heard if you get some of them together, you can have an outstanding magical power."; mes "Other than that, I can't think of any other metal, except ^FF0000High Density Bradiums, Kaluniums, Oridecons ^000000and ^FF0000Eluniums^000000."; mes "But I have no idea where to get those."; close; } if ([email protected]) { mes "[" + getarg(0) + "]"; mes "So how many do you wish to buy?"; mes "If you don't want any, please enter the number, '0.'"; next; while(1) { input [email protected]; if ([email protected] == 0) { mes "[" + getarg(0) + "]"; mes "The deal has"; mes "been cancelled."; close; } else if ([email protected] < 0 || [email protected] > 500) { mes "[" + getarg(0) + "]"; mes "Alright, you can"; mes "puchase up to 500."; mes "No more than that,"; mes "got it? Good."; next; } else { break; } } set [email protected],[email protected] * [email protected]; if (Zeny < [email protected]) { mes "[" + getarg(0) + "]"; mes "Err..."; mes "You don't have"; mes "enough Zeny to buy"; mes ""+ [email protected] +" of them."; close; } if (checkweight([email protected],[email protected]) == 0) { mes "[" + getarg(0) + "]"; mes "Hmm..."; mes "I can't give you anything if you don't have enough room in your inventory. Why don't you put your extra things in Kafra Storage and try again?"; close; } set Zeny,[email protected]; getitem [email protected],[email protected]; mes "[" + getarg(0) + "]"; mes "Here you are!"; mes "Thank you for"; mes "your patronage."; close; } else { mes "[" + getarg(0) + "]"; mes "It will cost you "[email protected]+" ^0000FF"+getitemname([email protected])+"^000000 and ^009933"[email protected]+" Zeny^000000 per trade. In exchange, you will get "[email protected]+" ^FF0000"+getitemname([email protected])+"^000000. How many times would you like to trade? Input '0' to cancel."; next; while(1) { input [email protected]; if ([email protected] == 0) { mes "[" + getarg(0) + "]"; mes "The deal has"; mes "been cancelled."; close; } else if ([email protected] < 0 || [email protected] > 500) { mes "[" + getarg(0) + "]"; mes "Alright, you can"; mes "trade up to 500."; mes "No more than that,"; mes "got it? Good."; next; } else { break; } } set [email protected],[email protected] * [email protected]; if (Zeny < [email protected]) { mes "[" + getarg(0) + "]"; mes "Err..."; mes "You don't have"; mes "enough Zeny to trade"; mes ""+ [email protected] +" of them."; close; } if (checkweight([email protected],[email protected] * [email protected]) == 0) { mes "[" + getarg(0) + "]"; mes "Hmm..."; mes "I can't give you anything if you don't have enough room in your inventory. Why don't you put your extra things in Kafra Storage and try again?"; close; } set [email protected]_amount, [email protected] * [email protected]; if (countitem([email protected]) < [email protected]_amount ) { mes "[" + getarg(0) + "]"; mes "You don't have enough ^0000FF"+getitemname([email protected])+"^000000. Come back when you do."; close; } delitem [email protected], [email protected]_amount; getitem [email protected], [email protected] * [email protected]; set Zeny,[email protected]; mes "[" + getarg(0) + "]"; mes "Here you are!"; mes "Thank you for"; mes "your patronage."; close; } } //============================================================================== // Ori/Elu Refiners //============================================================================== prt_in,63,69,4 script Dietrich 84,{ callfunc "orimain","Dietrich"; end; } payon,137,178,4 script Hakhim 88,{ callfunc "orimain","Hakhim"; end; } morocc_in,72,32,4 script Abdul 99,{ callfunc "orimain","Abdul"; end; } alberta_in,21,63,5 script Xenophon 84,{ callfunc "orimain","Xenophon"; end; } yuno_in01,171,22,6 script Delayt 88,{ callfunc "orimain","Delayt"; end; } ein_in01,18,82,6 script Matestein 84,{ callfunc "orimain","Matestein"; end; } lhz_in02,281,24,5 script Fruel 84,{ callfunc "orimain","Fruel"; end; } //============================================================ //= Ori/Elu Functions //============================================================ function script orimain { if (checkweight(1201,1) == 0) { mes "- Wait a minute !! -"; mes "- Currently you're carrying -"; mes "- too many items with you. -"; mes "- Please try again -"; mes "- after you loose some weight. -"; close; } mes "[" + getarg(0) + "]"; mes "I can purify your"; mes "Rough Oridecons or"; mes "Rough Eluniums. I'll need"; mes "5 Rough Stones to make"; mes "1 pure one for you."; next; switch(select("Make Oridecon:Make Elunium:Ask about Enchanted Stones")) { case 1: if (countitem(756) > 4) { delitem 756,5; //Oridecon_Stone getitem 984,1; // Oridecon mes "[" + getarg(0) + "]"; mes "Here's your Oridecon."; mes "You're welcome to come"; mes "back whenever you want."; close; } else { mes "[" + getarg(0) + "]"; mes "You're kidding me, right?"; mes "I just told you that I need 5 Rough Oridecons to make a pure Oridecon."; close; } case 2: if (countitem(757) > 4) { delitem 757,5; //Elunium_Stone getitem 985,1; // Elunium mes "[" + getarg(0) + "]"; mes "Here's your Elunium."; mes "You're welcome to come"; mes "back whenever you want."; close; } else { mes "[" + getarg(0) + "]"; mes "You're kidding me, right?"; mes "I just told you that I need 5 Rough Eluniums to make a pure Elunium."; close; } case 3: mes "[" + getarg(0) + "]"; mes "Enchanted Stones...?"; mes "I've been a stonesmith for 20 years, so I've heard a lot about them. Supposedly, there are"; mes "four different kinds."; next; mes "[" + getarg(0) + "]"; mes "Each Enchanted Stone possesses one of the following elemental properties: Earth, Wind, Water and Fire."; next; mes "[" + getarg(0) + "]"; mes "If someone combines a Enchanted Stone with a weapon while smithing, that weapon will possess the same property as the Stone."; next; mes "[" + getarg(0) + "]"; mes "Needless to say, you need to have some smithing skill to produce this kind of elemental weapon."; close; } } //===================================================================================== // Equipment Repairmen //===================================================================================== alberta_in,31,65,4 script Repairman#alb 86,{ callfunc "repairmain","Repairman"; end; } moc_ruins,107,94,5 script Repairman#moc 99,{ callfunc "repairmain","Repairman"; end; } payon,143,165,4 script Repairman#pay 88,{ callfunc "repairmain","Repairman"; end; } prt_in,63,54,2 script Repairman#prt 86,{ callfunc "repairmain","Grendal"; end; } yuno_in01,175,28,3 script Repairman#juno 86,{ callfunc "repairmain","Repairman"; end; } geffen_in,34,166,3 script Repairman#gef 99,{ callfunc "repairmain","Repairman"; end; } aldeba_in,38,60,3 script Repairman#alde 86,{ callfunc "repairmain","Repairman"; end; } lhz_in02,284,14,3 script Repairman#lhz 86,{ callfunc "repairmain","Repairman"; end; } //============================================================ //= Equipment Repair Function //============================================================ function script repairmain { set [email protected],5000; mes "["+getarg(0)+"]"; mes "Hey there!"; mes "Do you want me"; mes "to repair any items?"; mes "You can count on me"; mes "for item repairs!"; next; switch(select("Actually, I do have some items...:None at the moment.")) { case 1: set [email protected],1; while (1) { if (getbrokenid([email protected]) == 0) { break; } set [email protected],[email protected]+1; } set [email protected],[email protected]; if ([email protected]) { mes "["+getarg(0)+"]"; mes "Oh wow, this is incredible!"; mes "You must take very good care of your things. None of your items are damaged!"; next; mes "["+getarg(0)+"]"; mes "If everyone is like you, I'm going to be unemployed!! Haha~!"; close; } mes "["+getarg(0)+"]"; mes "Hmm..."; mes "Let's see..."; mes "Out of all your items,"; mes "" + [email protected] + " are damaged."; mes "Would you like to repair?"; next; set [email protected],[email protected]*[email protected]; mes "["+getarg(0)+"]"; mes "Each repair costs " + [email protected] + " Zeny. So to repair all your damaged items would cost " + [email protected] + " Zeny! Would you like to repair the items?"; next; switch(select("Yes:No")) { case 1: if (Zeny < [email protected]) { mes "["+getarg(0)+"]"; mes "Whoa whoa..."; mes "Check your wallet before you receive the repair bill! I can't repair anything because you don't have enough Zeny."; close; } set [email protected],1; while (1) { if (getbrokenid([email protected]) == 0) { break; } set [email protected],[email protected]+1; } set [email protected],[email protected]; if ([email protected] == [email protected]) { set zeny,[email protected]; while ([email protected]) { repair([email protected]); set [email protected],[email protected]; } mes "["+getarg(0)+"]"; mes "Okay! All done. Now, try to be a little more careful. Items have lives too you know."; close; } else { mes "["+getarg(0)+"]"; mes "Mmm? Something's wrong. Wait... Equip the items you need to repair and then come back to me."; close; } case 2: mes "["+getarg(0)+"]"; mes "Well, it's no skin off my nose, but it's not good to leave items damaged. You should get them repaired as soon as possible!"; close; } case 2: mes "["+getarg(0)+"]"; mes "Hohoho..."; mes "You don't have"; mes "any business with me"; mes "if you don't have any"; mes "items to repair."; close; } } well anyway this was a script from kenedos quick full inventory refiner.........
  13. hahaha! i would love to know more about coding if i have time but i'm working 12hours NOC shift at hospital .. i'm only able to to have time and play Ragnarok for atlease 1-2 hours everyday LOL! anyway thanks for fast reply prolly just disable the ALL refine function... HAHAH!!
  14. this is where the getinventory list is shoul i put something like for (set [email protected], 0; [email protected] < 4; set [email protected], [email protected] + 1) set [email protected][[email protected]], getequipcardid([email protected],[email protected]); ????? if ([email protected]) { deletearray @inventorylist_refine; deletearray @inventorylist_id; getinventorylist; set [email protected], 0; for (set [email protected], 0; [email protected] < @inventorylist_count; set [email protected], [email protected] + 1) { if ( @inventorylist_id[[email protected]] == getequipid([email protected]) ) { set [email protected][[email protected]], @inventorylist_refine[[email protected]]; set [email protected], [email protected] + 1; } } deletearray @inventorylist_refine; deletearray @inventorylist_id; } set [email protected], 0; if ( [email protected] ) set [email protected],[email protected] * [email protected]; else { set [email protected], 0; for ( set [email protected], 0; [email protected] < [email protected] ; set [email protected], [email protected] + 1) { if ( [email protected][[email protected]] < [email protected] ) { set [email protected], [email protected] + ( ( [email protected] - [email protected][[email protected]] ) * [email protected] ); set [email protected], [email protected] + ([email protected] - [email protected][[email protected]]); } } deletearray [email protected]; } mes "[ Agil ]"; if ( [email protected] ) mes "I will need ^ff0000" + [email protected]+ " " + getitemname([email protected]) + "^000000 and ^0000ff" + [email protected] + " Zeny^000000 for the labor."; else mes "I will need ^ff0000" + [email protected] + " " + getitemname([email protected]) + "^000000 and ^0000ff" + [email protected] + " Zeny^000000 for the labor."; mes " "; mes "Proceed?"; next; if(select("Yes","No") == 2){ close; } if ( [email protected] ) { if(countitem([email protected]) < [email protected] ){ mes "[ Agil ]"; mes "You do not have enough ^ff0000"+getitemname([email protected])+"^000000."; close; } if (Zeny < [email protected]){ mes "[ Agil ]"; mes "You do not have enough ^ff0000Zeny^000000."; close; } set Zeny,Zeny - [email protected]; delitem [email protected],[email protected]; while([email protected]){ if (getequipisequiped([email protected]) == 0) { mes "[ Agil ]"; mes "You're not wearing any item that i can refine."; close; } if (checkweight([email protected],1) == 0 ) { mes "[ Agil ]"; mes "Your character is overweight."; close; } if (getequipid([email protected]) != [email protected] || ([email protected] == 1 && getequippercentrefinery([email protected]) < 100)) { mes "[ Agil ]"; mes "Do not change your equipment in the middle of refining."; next; atcommand "@nuke "+strcharinfo(0); end; } mes "[ Agil ]"; mes "Clang, clang, CLaNg!!!"; if([email protected] == 2 && getequippercentrefinery([email protected]) <= rand(100)) { failedrefitem [email protected]; emotion 23; set [email protected],[email protected] - 1; if([email protected] == 0) close; getitem [email protected],[email protected]; set [email protected],[email protected] * [email protected]; set Zeny,Zeny + [email protected]; close; } successrefitem [email protected]; emotion 21; set [email protected],[email protected] - 1; close2; } } else { if ( getbrokenid ([email protected]) ) { mes "[ Agil ]"; mes "Please repair all the equipment you have in your inventory first."; close; } if(countitem([email protected]) < [email protected] ){ mes "[ Agil ]"; mes "You do not have enough ^ff0000"+getitemname([email protected])+"^000000."; close; } if (Zeny < [email protected]) { mes "[ Agil ]"; mes "You do not have enough ^ff0000Zeny^000000."; close; } set [email protected], 0;