From c47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151 Mon Sep 17 00:00:00 2001 From: sevenzz23 Date: Thu, 31 Oct 2013 12:07:06 +0700 Subject: No error after compilation, but when logging in at map server it will crash. Im pretty sure its on the clif.c Signed-off-by: sevenzz23 --- conf/messages.conf | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) (limited to 'conf') diff --git a/conf/messages.conf b/conf/messages.conf index 7b7a99301..d2e57bb0e 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -316,6 +316,13 @@ 290: The player is no longer killable. 291: Weather effects will dispell on warp/refresh 292: Killer state reset. +//Item Bound System +293: This bounded item cannot be traded to that character. +294: This bounded item cannot be stored there. +295: Please enter an item name or ID (usage: @item ). +296: Please enter all parameters (usage: @item2 +297: ). +298: Invalid bound type. Valid types are - 1:Account 2:Guild 3:Party 4:Character // Guild Castles Number // -------------------- //299: ?? Castles @@ -455,6 +462,13 @@ // Messages of others (not for GM commands) // ---------------------------------------- +// Account-Bound Items +497: You cannot distribute this item - it is an account bounded item! + +// @itembound / @itembound2 +498: Cannot create bounded pet eggs or pet armors. +499: Cannot create bounded stackable items. + //500: FREE 501: Your account time limit is: %d-%m-%Y %H:%M:%S. 502: Day Mode is activated @@ -711,11 +725,13 @@ 981: Please enter color and message (usage: @kamic ). 982: Invalid color. -// @item -983: Please enter an item name or ID (usage: @item ). -// @item2 -984: Please enter all parameters (usage: @item2 +// @item / @itembound +983: Please enter an item name or ID (usage: @%s ). + + +// @item2 / @itembound2 +984: Please enter all parameters (usage: @%s ). 985: ). // @baselevelup @@ -1360,7 +1376,8 @@ 1361: Already using this font. // @new_mount -1362: NOTICE: If you crash with mount your LUA is outdated. +//1362: NOTICE: If you crash with mount your LUA is outdated. +1362: .. 1363: You have mounted. 1364: You have released your mount. @@ -1534,5 +1551,19 @@ //CashShop mapflag 1489: Cash Shop is disabled in this map + +// @autoloottype +1490: You're already autolooting this item type. +1491: Your autoloottype list has all item types. You can remove some items with @autoloottype -. +1492: Autolooting item type: '%s' {%d} +1493: You're currently not autolooting this item type. +1494: Removed item type: '%s' {%d} from your autoloottype list. +1495: To add an item type to the list, use "@aloottype +". To remove an item type, use "@aloottype -". +1496: Type List: healing = 0, usable = 2, etc = 3, weapon = 4, armor = 5, card = 6, petegg = 7, petarmor = 8, ammo = 10 +1497: "@aloottype reset" will clear your autoloottype list. +1498: Your autoloottype list is empty. +1499: Item types on your autoloottype list: +1500: Your autoloottype list has been reset. + //Custom translations import: conf/import/msg_conf.txt -- cgit v1.2.3-60-g2f50 From c5795013b52c95847491e13a5549381016629640 Mon Sep 17 00:00:00 2001 From: sevenzz23 Date: Fri, 1 Nov 2013 02:22:55 +0700 Subject: Item Binding System Final. Fixed, some issue thanks to Master Ind ;) Signed-off-by: sevenzz23 --- conf/groups.conf | 1 + conf/messages.conf | 4 +- npc/custom/itembind.txt | 132 ++++++++++++++++++++++++++++++++++++++++++++++++ npc/scripts_custom.conf | 1 + src/map/pc.c | 1 + 5 files changed, 137 insertions(+), 2 deletions(-) create mode 100644 npc/custom/itembind.txt (limited to 'conf') diff --git a/conf/groups.conf b/conf/groups.conf index 7c97352dc..9a4c57126 100644 --- a/conf/groups.conf +++ b/conf/groups.conf @@ -260,6 +260,7 @@ groups: ( log_commands: true permissions: { can_trade: true + can_trade_bounded: false can_party: true all_skill: false all_equipment: false diff --git a/conf/messages.conf b/conf/messages.conf index d2e57bb0e..a20b1353b 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -319,8 +319,8 @@ //Item Bound System 293: This bounded item cannot be traded to that character. 294: This bounded item cannot be stored there. -295: Please enter an item name or ID (usage: @item ). -296: Please enter all parameters (usage: @item2 +295: Please enter an item name or ID (usage: @itembound ). +296: Please enter all parameters (usage: @itembound2 297: ). 298: Invalid bound type. Valid types are - 1:Account 2:Guild 3:Party 4:Character // Guild Castles Number diff --git a/npc/custom/itembind.txt b/npc/custom/itembind.txt new file mode 100644 index 000000000..f290c48ef --- /dev/null +++ b/npc/custom/itembind.txt @@ -0,0 +1,132 @@ +//===== rAthena Script ======================================= +//= Item Bound Script +//===== By: ================================================== +//= Akinari +//===== Compatible With: ===================================== +//= Revision 17351+ (rAthena Only) +//===== Description: ========================================= +//= Item Bound Script +//= Allows users to pay a price to make an item bound to +//= Account, Character, or Guild +//============================================================ + +prontera,144,174,4 script Bound Items 429,{ + + mes "I can bind your items to your account, guild, or character"+((.bindprice)?" for a ^0000FF"+.bindprice+"^000000 zeny fee":"")+"."; + next; + mes "With this, you can rest assured your items are safe."; + next; + mes "What would you like to do?"; + if(select("Bind:Unbind") == 1) { + if(zeny < .bindprice) { + mes "You don't have enough zeny to bind an item."; + close; + } + mes "What kind of bind?"; + .@boundtype = 1 << (select("Account:Guild:Character")-1); + if(.@boundtype == 2 && (!getcharid(2) || getguildmaster(getcharid(2)) != strcharinfo(0))) { + mes "In order for me to bind an item to a guild you must be the master of one."; + close; + } + getinventorylist(); + for(.@i = 0; .@i < @inventorylist_count; .@i++) { + //We only show the items that you allow to be bound + //Allows equipment (default) + if(@inventorylist_bound[.@i]) + continue; + if(((.allowbind & 1) && (getiteminfo(@inventorylist_id[.@i],2) == (4|5))) || + ((.allowbind & 2) && (getiteminfo(@inventorylist_id[.@i],2) == (0|2|11|18))) || + ((.allowbind & 4) && (getiteminfo(@inventorylist_id[.@i],2) == (3|6|7|8|10))) + ) { + set .@bindlist$, .@bindlist$ + ":" + getitemname(@inventorylist_id[.@i]) + " - " + @inventorylist_id[.@i]; + set .@bindlist[.@j],.@i; + .@j++; + } + } + .@item = .@bindlist[select(.@bindlist$)-2]; + next; + mes "Before I continue, I want you to know I can't tell the difference between multiple items. If you have a specific item you want bounded, please remove any duplicates from inventory."; + if(select("I understand, continue:Wait a minute") == 2) { + next; + mes "I'll be here when you're ready."; + close; + } + next; + mes "Are you sure you'd like to bind your "+ getitemname(@inventorylist_id[.@item]) +" to your "+.boundtypes$[.@boundtype]+"?"; + if(select("Yes:No") == 1) { + zeny -= .bindprice; + delitem2 @inventorylist_id[.@item],@inventorylist_amount[.@item],@inventorylist_identify[.@item],@inventorylist_refine[.@item],@inventorylist_attribute[.@item],@inventorylist_card1[.@item],@inventorylist_card2[.@item],@inventorylist_card3[.@item],@inventorylist_card4[.@item]; + getitembound2 @inventorylist_id[.@item],@inventorylist_amount[.@item],@inventorylist_identify[.@item],@inventorylist_refine[.@item],@inventorylist_attribute[.@item],@inventorylist_card1[.@item],@inventorylist_card2[.@item],@inventorylist_card3[.@item],@inventorylist_card4[.@item],.@boundtype; + mes "All done!"; + if(.logbinds) + logmes "Bound "+ @inventorylist_amount[.@item]+" "+@inventorylist_id[.@item]+" as "+.boundtypes$[.@boundtype]+" type."; + } + } else { + /*if(!countbound()) { + mes "You don't have any bound items in your inventory. Not much I can do here."; + close; + } + countbound(2); + if(.unbindprice) { + mes "Unbinding an item has a fee of ^0000FF"+.unbindprice+"^000000 zeny."; + if(zeny < .unbindprice) { + mes "You don't have enough to unbind an item."; + close; + } + }*/ + getinventorylist(); + for(.@i = 0; .@i < @inventorylist_count; .@i++) { + if(@inventorylist_bound[.@i]) { + set .@bindlist$, .@bindlist$ + ":" + getitemname(@inventorylist_id[.@i]) + " - " + @inventorylist_id[.@i]; + set .@bindlist[.@j],.@i; + .@j++; + } + } + .@item = .@bindlist[select(.@bindlist$)-2]; + next; + for(.@i = 0; .@i < getarraysize(@bound_items); .@i++) { + if(@inventorylist_id[.@item] == @bound_items[.@i] && + (!getcharid(2) || getguildmaster(getcharid(2)) != strcharinfo(0)) + ) { + mes "I will only unbind guild bound items that the guild master requests."; + close; + } + } + mes "Before I continue, I want you to know I can't tell the difference between multiple items. If you have a specific item you want unbounded, please remove any duplicates from inventory."; + if(select("I understand, continue:Wait a minute") == 2) { + next; + mes "I'll be here when you're ready."; + close; + } + next; + mes "Are you sure you'd like to unbind your "+ getitemname(@inventorylist_id[.@item]) +"?"; + if(select("Yes:No") == 1) { + zeny -= .unbindprice; + delitem2 @inventorylist_id[.@item],@inventorylist_amount[.@item],@inventorylist_identify[.@item],@inventorylist_refine[.@item],@inventorylist_attribute[.@item],@inventorylist_card1[.@item],@inventorylist_card2[.@item],@inventorylist_card3[.@item],@inventorylist_card4[.@item]; + getitem2 @inventorylist_id[.@item],@inventorylist_amount[.@item],@inventorylist_identify[.@item],@inventorylist_refine[.@item],@inventorylist_attribute[.@item],@inventorylist_card1[.@item],@inventorylist_card2[.@item],@inventorylist_card3[.@item],@inventorylist_card4[.@item]; + mes "All done!"; + if(.logbinds) + logmes "Unbound "+ @inventorylist_amount[.@item]+" "+@inventorylist_id[.@item]+"."; + } + } + close; + +OnInit: + //* Configuration *\\ + //Price + .bindprice = 0; + .unbindprice = 100000; + + //What to allow to be bound - Add as necessary + //1 = Equipment - 2 = Consumables - 4 = Etc + .allowbind = 1; + + //Log binds via NPC? + .logbinds = 1; + + //Other stuff + .boundtypes$[1] = "account"; + .boundtypes$[2] = "guild"; + .boundtypes$[4] = "character"; + end; +} \ No newline at end of file diff --git a/npc/scripts_custom.conf b/npc/scripts_custom.conf index c6e550864..aeae9e22f 100644 --- a/npc/scripts_custom.conf +++ b/npc/scripts_custom.conf @@ -7,6 +7,7 @@ //npc: npc/location/to/script.txt // ----------------------- Basic Scripts ----------------------- +//npc: npc/custom/itembind.txt //npc: npc/custom/warper.txt //npc: npc/custom/jobmaster.txt //npc: npc/custom/platinum_skills.txt diff --git a/src/map/pc.c b/src/map/pc.c index ba445b4f4..6c4ebe149 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -10331,6 +10331,7 @@ void pc_defaults(void) { pc->class2idx = pc_class2idx; pc->get_group_level = pc_get_group_level; pc->can_give_items = pc_can_give_items; + pc->bound_chk = pc_bound_chk; pc->can_give_bounded_items = pc_can_give_bounded_items; pc->can_use_command = pc_can_use_command; -- cgit v1.2.3-60-g2f50 From a8ae62ebf1073501e0ff8a2bf159dc88a0a8f178 Mon Sep 17 00:00:00 2001 From: sevenzz23 Date: Fri, 1 Nov 2013 02:41:21 +0700 Subject: Deleted extra messages lines. Signed-off-by: sevenzz23 --- conf/messages.conf | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) (limited to 'conf') diff --git a/conf/messages.conf b/conf/messages.conf index a20b1353b..54fd24fde 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -726,14 +726,13 @@ 982: Invalid color. -// @item / @itembound -983: Please enter an item name or ID (usage: @%s ). +// @item +983: Please enter an item name or ID (usage: @item ). -// @item2 / @itembound2 -984: Please enter all parameters (usage: @%s ). +// @item2 +984: Please enter all parameters (usage: @item2 ). 985: ). - // @baselevelup 986: Please enter a level adjustment (usage: @lvup/@blevel/@baselvlup ). @@ -1376,8 +1375,7 @@ 1361: Already using this font. // @new_mount -//1362: NOTICE: If you crash with mount your LUA is outdated. -1362: .. +1362: NOTICE: If you crash with mount your LUA is outdated. 1363: You have mounted. 1364: You have released your mount. @@ -1548,22 +1546,8 @@ 1486: Cannot transform into monster while in disguise. 1487: Character cannot be disguised while in monster form. 1488: Transforming into monster is not allowed in Guild Wars. - //CashShop mapflag 1489: Cash Shop is disabled in this map -// @autoloottype -1490: You're already autolooting this item type. -1491: Your autoloottype list has all item types. You can remove some items with @autoloottype -. -1492: Autolooting item type: '%s' {%d} -1493: You're currently not autolooting this item type. -1494: Removed item type: '%s' {%d} from your autoloottype list. -1495: To add an item type to the list, use "@aloottype +". To remove an item type, use "@aloottype -". -1496: Type List: healing = 0, usable = 2, etc = 3, weapon = 4, armor = 5, card = 6, petegg = 7, petarmor = 8, ammo = 10 -1497: "@aloottype reset" will clear your autoloottype list. -1498: Your autoloottype list is empty. -1499: Item types on your autoloottype list: -1500: Your autoloottype list has been reset. - //Custom translations import: conf/import/msg_conf.txt -- cgit v1.2.3-60-g2f50 From 6be40f56a21e48505baa4ff69acc198aa6206bf1 Mon Sep 17 00:00:00 2001 From: sevenzz23 Date: Tue, 5 Nov 2013 05:32:36 +0700 Subject: Fixed grammar Signed-off-by: sevenzz23 --- conf/messages.conf | 3 ++- npc/custom/itembind.txt | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'conf') diff --git a/conf/messages.conf b/conf/messages.conf index 54fd24fde..a56a7a45b 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -316,7 +316,7 @@ 290: The player is no longer killable. 291: Weather effects will dispell on warp/refresh 292: Killer state reset. -//Item Bound System +//Item Bind System 293: This bounded item cannot be traded to that character. 294: This bounded item cannot be stored there. 295: Please enter an item name or ID (usage: @itembound ). @@ -1546,6 +1546,7 @@ 1486: Cannot transform into monster while in disguise. 1487: Character cannot be disguised while in monster form. 1488: Transforming into monster is not allowed in Guild Wars. + //CashShop mapflag 1489: Cash Shop is disabled in this map diff --git a/npc/custom/itembind.txt b/npc/custom/itembind.txt index f290c48ef..a95de3577 100644 --- a/npc/custom/itembind.txt +++ b/npc/custom/itembind.txt @@ -1,11 +1,12 @@ -//===== rAthena Script ======================================= -//= Item Bound Script +//===== Hercules Script ======================================= +//= Item Bind Script //===== By: ================================================== //= Akinari //===== Compatible With: ===================================== -//= Revision 17351+ (rAthena Only) +//= Revision 17351+ (rAthena) +//= Revision 12949+ (Hercules) //===== Description: ========================================= -//= Item Bound Script +//= Item Bind Script //= Allows users to pay a price to make an item bound to //= Account, Character, or Guild //============================================================ -- cgit v1.2.3-60-g2f50