diff options
author | Kenpachi2k13 <3476227+Kenpachi2k13@users.noreply.github.com> | 2020-05-03 09:14:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-03 09:14:56 +0200 |
commit | cd593de68b02d77766fcb3b7b2a869096ceb7183 (patch) | |
tree | 2245738ce70d50031b927fed560815458658c7c2 /npc/custom | |
parent | f70a887b188dbd88c45c9992cd18a33b6886005f (diff) | |
parent | f40cc839413cc82aed445d39cc3aa204dce87780 (diff) | |
download | hercules-cd593de68b02d77766fcb3b7b2a869096ceb7183.tar.gz hercules-cd593de68b02d77766fcb3b7b2a869096ceb7183.tar.bz2 hercules-cd593de68b02d77766fcb3b7b2a869096ceb7183.tar.xz hercules-cd593de68b02d77766fcb3b7b2a869096ceb7183.zip |
Merge branch 'master' into cell_noskill
Diffstat (limited to 'npc/custom')
-rw-r--r-- | npc/custom/battleground/bg_kvm01.txt | 4 | ||||
-rw-r--r-- | npc/custom/battleground/bg_kvm02.txt | 4 | ||||
-rw-r--r-- | npc/custom/battleground/bg_kvm03.txt | 4 | ||||
-rw-r--r-- | npc/custom/etc/bank.txt | 38 | ||||
-rw-r--r-- | npc/custom/etc/bank_kafra.txt | 6 | ||||
-rw-r--r-- | npc/custom/etc/lottery.txt | 150 | ||||
-rw-r--r-- | npc/custom/etc/marriage.txt | 2 | ||||
-rw-r--r-- | npc/custom/etc/monster_arena.txt | 9 | ||||
-rw-r--r-- | npc/custom/etc/quest_warper.txt | 42 | ||||
-rw-r--r-- | npc/custom/etc/shifty_assassin.txt | 7 | ||||
-rw-r--r-- | npc/custom/etc/stock_market.txt | 15 | ||||
-rw-r--r-- | npc/custom/events/cluckers.txt | 4 | ||||
-rw-r--r-- | npc/custom/events/disguise.txt | 10 | ||||
-rw-r--r-- | npc/custom/events/mushroom_event.txt | 11 | ||||
-rw-r--r-- | npc/custom/events/valentinesdayexp.txt | 33 | ||||
-rw-r--r-- | npc/custom/expandedbartershop.txt | 63 | ||||
-rw-r--r-- | npc/custom/itembind.txt | 12 | ||||
-rw-r--r-- | npc/custom/quests/quest_shop.txt | 4 | ||||
-rw-r--r-- | npc/custom/quests/thq/THQS_TTShop.txt | 4 | ||||
-rw-r--r-- | npc/custom/stylist.txt | 78 | ||||
-rw-r--r-- | npc/custom/woe_controller.txt | 4 |
21 files changed, 326 insertions, 178 deletions
diff --git a/npc/custom/battleground/bg_kvm01.txt b/npc/custom/battleground/bg_kvm01.txt index a66e202e3..bb3ba3e06 100644 --- a/npc/custom/battleground/bg_kvm01.txt +++ b/npc/custom/battleground/bg_kvm01.txt @@ -329,7 +329,7 @@ bat_c01,51,130,5 script Guillaume Vintenar::VintenarKvM01a 4_M_KY_HEAD,{ } setquest 6025; - getitem 7773, .@reward; + getitem KVM_Badge, .@reward; bg_leave; warp "bat_room",155,150; end; @@ -365,7 +365,7 @@ bat_c01,148,53,1 script Croix Vintenar::VintenarKvM01b 4_M_CRU_HEAD,{ } setquest 6025; - getitem 7773, .@reward; + getitem KVM_Badge, .@reward; bg_leave; warp "bat_room",155,150; end; diff --git a/npc/custom/battleground/bg_kvm02.txt b/npc/custom/battleground/bg_kvm02.txt index f1637069a..a6cadb3af 100644 --- a/npc/custom/battleground/bg_kvm02.txt +++ b/npc/custom/battleground/bg_kvm02.txt @@ -329,7 +329,7 @@ bat_c02,51,130,5 script Guillaume Vintenar::VintenarKvM02a 4_M_KY_HEAD,{ } setquest 6025; - getitem 7773, .@reward; + getitem KVM_Badge, .@reward; bg_leave; warp "bat_room",155,150; end; @@ -365,7 +365,7 @@ bat_c02,148,53,1 script Croix Vintenar::VintenarKvM02b 4_M_CRU_HEAD,{ } setquest 6025; - getitem 7773, .@reward; + getitem KVM_Badge, .@reward; bg_leave; warp "bat_room",155,150; end; diff --git a/npc/custom/battleground/bg_kvm03.txt b/npc/custom/battleground/bg_kvm03.txt index 612047dcb..8f255c90f 100644 --- a/npc/custom/battleground/bg_kvm03.txt +++ b/npc/custom/battleground/bg_kvm03.txt @@ -329,7 +329,7 @@ bat_c03,51,130,5 script Guillaume Vintenar::VintenarKvM03a 4_M_KY_HEAD,{ } setquest 6025; - getitem 7773, .@reward; + getitem KVM_Badge, .@reward; bg_leave; warp "bat_room",155,150; end; @@ -365,7 +365,7 @@ bat_c03,148,53,1 script Croix Vintenar::VintenarKvM03b 4_M_CRU_HEAD,{ } setquest 6025; - getitem 7773, .@reward; + getitem KVM_Badge, .@reward; bg_leave; warp "bat_room",155,150; end; diff --git a/npc/custom/etc/bank.txt b/npc/custom/etc/bank.txt index c5bed187b..4135ed192 100644 --- a/npc/custom/etc/bank.txt +++ b/npc/custom/etc/bank.txt @@ -28,27 +28,25 @@ switch(select("I'd like to make a deposit.", "I'd like to make a withdrawl.", "W mes "Oh, and do realize there is a " +@cost + " Zeny charge on all transactions!"; next; } - input @deposit; + input(@deposit); if (@deposit < 1) { mes "Make sure you ask me to deposit a real amount."; close; } - else if (@deposit > Zeny) { + if (@deposit > Zeny) { mes "It does not appear like you have the amount of zeny you're trying to deposit!"; close; } - else if (@deposit > (Zeny - @cost)) { + if (@deposit > Zeny - @cost) { mes "You need " + @cost + " Zeny to cover the transaction fee!"; close; } - else { Zeny -= @deposit; Zeny -= @cost; - set #bankstorage,#bankstorage + @deposit; + #bankstorage += @deposit; mes "[Banker]"; mes "Thank you very much... Your zeny is in good hands."; close; - } case 2: mes "[Banker]"; @@ -59,16 +57,16 @@ switch(select("I'd like to make a deposit.", "I'd like to make a withdrawl.", "W mes "Oh, and do realize there is a " +@cost + " Zeny charge on all transactions!"; next; } - input @withdrawl; + input(@withdrawl); if (@withdrawl < 1) { mes "Please don't play games. I need a real amount to withdraw."; close; } - else if (@withdrawl > #bankstorage) { + if (@withdrawl > #bankstorage) { mes "I show you only have ^00FF00" + #bankstorage +"^000000 zeny in your account!"; close; } - else if ((@cost > Zeny) && ((Zeny + @withdrawl) > @cost)) { + if (@cost > Zeny && Zeny + @withdrawl > @cost) { mes "[Banker]"; mes "You don't have the Zeny for the transaction fee right now. Would you like me to take the fee directly from your withdrawl?"; next; @@ -76,13 +74,13 @@ switch(select("I'd like to make a deposit.", "I'd like to make a withdrawl.", "W case 1: mes "[Banker]"; mes "Removing " + @cost + " from your withdrawl to cover the deposit fee..."; - set @withdrawl,@withdrawl - @cost; - set #bankstorage,#bankstorage - @cost; - set @cost,0; + @withdrawl -= @cost; + #bankstorage -= @cost; + @cost = 0; next; Zeny -= @cost; Zeny += @withdrawl; - set #bankstorage,#bankstorage - @withdrawl; + #bankstorage -= @withdrawl; mes "[Banker]"; mes "There's your Zeny. Have a good day."; close; @@ -92,14 +90,12 @@ switch(select("I'd like to make a deposit.", "I'd like to make a withdrawl.", "W close; } } - else { - Zeny -= @cost; - Zeny += @withdrawl; - set #bankstorage,#bankstorage - @withdrawl; - mes "[Banker]"; - mes "There's your Zeny. Have a good day."; - close; - } + Zeny -= @cost; + Zeny += @withdrawl; + #bankstorage -= @withdrawl; + mes "[Banker]"; + mes "There's your Zeny. Have a good day."; + close; case 3: mes "[Banker]"; mes "Hmmmm let me check some paper work."; diff --git a/npc/custom/etc/bank_kafra.txt b/npc/custom/etc/bank_kafra.txt index 375a9f611..a970f8302 100644 --- a/npc/custom/etc/bank_kafra.txt +++ b/npc/custom/etc/bank_kafra.txt @@ -44,7 +44,8 @@ L_NoIncomeToday: mes"[Maniss]"; mes "Please, tell me how much zeny you would like to deposit."; next; - if(input(@kafrabank) == 1) goto L_TOO_BIG_AMOUNT; + if (input(@kafrabank, 0) == 1) + goto L_TOO_BIG_AMOUNT; if(@kafrabank<1000) goto L_LESS_1000; if(@kafrabank>Zeny) goto L_NOT_ENOUGH; @@ -62,7 +63,8 @@ M_WITHDRAW: mes "Your account: ^135445" + #kafrabank + "^000000 zeny."; mes "How much zeny would you like to withdraw?"; next; - if(input(@kafrabank) == 1) goto L_TOO_BIG_AMOUNT; + if (input(@kafrabank, 0) == 1) + goto L_TOO_BIG_AMOUNT; if(@kafrabank<1) goto B_EXIT2; if(@kafrabank>#kafrabank) goto L_NOT_ENOUGH; diff --git a/npc/custom/etc/lottery.txt b/npc/custom/etc/lottery.txt index 421fccc78..0c6c987a5 100644 --- a/npc/custom/etc/lottery.txt +++ b/npc/custom/etc/lottery.txt @@ -171,43 +171,64 @@ L_HandPick: set @L5,0; set @L6,0; Input1: - input @L1; - if (@L1 < 1 || @L1 > 40) goto Input1; + input(@L1); + if (@L1 < 1 || @L1 > 40) + goto Input1; mes @L1; Input2: - input @L2; - if (@L2 < 1 || @L2 > 40) goto Input2; - if (@L2 == @L1) goto Input2; + input(@L2); + if (@L2 < 1 || @L2 > 40) + goto Input2; + if (@L2 == @L1) + goto Input2; mes @L2; Input3: - input @L3; - if (@L3 < 1 || @L3 > 40) goto Input3; - if (@L3 == @L1) goto Input3; - if (@L3 == @L2) goto Input3; + input(@L3); + if (@L3 < 1 || @L3 > 40) + goto Input3; + if (@L3 == @L1) + goto Input3; + if (@L3 == @L2) + goto Input3; mes @L3; Input4: - input @L4; - if (@L4 < 1 || @L4 > 40) goto Input4; - if (@L4 == @L1) goto Input4; - if (@L4 == @L2) goto Input4; - if (@L4 == @L3) goto Input4; + input(@L4); + if (@L4 < 1 || @L4 > 40) + goto Input4; + if (@L4 == @L1) + goto Input4; + if (@L4 == @L2) + goto Input4; + if (@L4 == @L3) + goto Input4; mes @L4; Input5: - input @L5; - if (@L5 < 1 || @L5 > 40) goto Input5; - if (@L5 == @L1) goto Input5; - if (@L5 == @L2) goto Input5; - if (@L5 == @L3) goto Input5; - if (@L5 == @L4) goto Input5; + input(@L5); + if (@L5 < 1 || @L5 > 40) + goto Input5; + if (@L5 == @L1) + goto Input5; + if (@L5 == @L2) + goto Input5; + if (@L5 == @L3) + goto Input5; + if (@L5 == @L4) + goto Input5; mes @L5; Input6: - input @L6; - if (@L6 < 1 || @L6 > 40) goto Input6; - if (@L6 == @L1) goto Input6; - if (@L6 == @L2) goto Input6; - if (@L6 == @L3) goto Input6; - if (@L6 == @L4) goto Input6; - if (@L6 == @L5) goto Input6; + input(@L6); + if (@L6 < 1 || @L6 > 40) + goto Input6; + if (@L6 == @L1) + goto Input6; + if (@L6 == @L2) + goto Input6; + if (@L6 == @L3) + goto Input6; + if (@L6 == @L4) + goto Input6; + if (@L6 == @L5) + goto Input6; mes @L6; next; mes "[Lottery]"; @@ -406,43 +427,64 @@ L_GM_Rig: set $LR5,0; set $LR6,0; GMInput1: - input $LR1; - if ($LR1 < 1 || $LR1 > 40) goto GMInput1; + input($LR1); + if ($LR1 < 1 || $LR1 > 40) + goto GMInput1; mes $LR1; GMInput2: - input $LR2; - if ($LR2 < 1 || $LR2 > 40) goto GMInput2; - if ($LR2 == $LR1) goto GMInput2; + input($LR2); + if ($LR2 < 1 || $LR2 > 40) + goto GMInput2; + if ($LR2 == $LR1) + goto GMInput2; mes $LR2; GMInput3: - input $LR3; - if ($LR3 < 1 || $LR3 > 40) goto GMInput3; - if ($LR3 == $LR1) goto GMInput3; - if ($LR3 == $LR2) goto GMInput3; + input($LR3); + if ($LR3 < 1 || $LR3 > 40) + goto GMInput3; + if ($LR3 == $LR1) + goto GMInput3; + if ($LR3 == $LR2) + goto GMInput3; mes $LR3; GMInput4: - input $LR4; - if ($LR4 < 1 || $LR4 > 40) goto GMInput4; - if ($LR4 == $LR1) goto GMInput4; - if ($LR4 == $LR2) goto GMInput4; - if ($LR4 == $LR3) goto GMInput4; + input($LR4); + if ($LR4 < 1 || $LR4 > 40) + goto GMInput4; + if ($LR4 == $LR1) + goto GMInput4; + if ($LR4 == $LR2) + goto GMInput4; + if ($LR4 == $LR3) + goto GMInput4; mes $LR4; GMInput5: - input $LR5; - if ($LR5 < 1 || $LR5 > 40) goto GMInput5; - if ($LR5 == $LR1) goto GMInput5; - if ($LR5 == $LR2) goto GMInput5; - if ($LR5 == $LR3) goto GMInput5; - if ($LR5 == $LR4) goto GMInput5; + input($LR5); + if ($LR5 < 1 || $LR5 > 40) + goto GMInput5; + if ($LR5 == $LR1) + goto GMInput5; + if ($LR5 == $LR2) + goto GMInput5; + if ($LR5 == $LR3) + goto GMInput5; + if ($LR5 == $LR4) + goto GMInput5; mes $LR5; GMInput6: - input $LR6; - if ($LR6 < 1 || $LR6 > 40) goto GMInput6; - if ($LR6 == $LR1) goto GMInput6; - if ($LR6 == $LR2) goto GMInput6; - if ($LR6 == $LR3) goto GMInput6; - if ($LR6 == $LR4) goto GMInput6; - if ($LR6 == $LR5) goto GMInput6; + input($LR6); + if ($LR6 < 1 || $LR6 > 40) + goto GMInput6; + if ($LR6 == $LR1) + goto GMInput6; + if ($LR6 == $LR2) + goto GMInput6; + if ($LR6 == $LR3) + goto GMInput6; + if ($LR6 == $LR4) + goto GMInput6; + if ($LR6 == $LR5) + goto GMInput6; mes $LR6; next; mes "[Lottery]"; diff --git a/npc/custom/etc/marriage.txt b/npc/custom/etc/marriage.txt index 4e521ec55..c392c5ff1 100644 --- a/npc/custom/etc/marriage.txt +++ b/npc/custom/etc/marriage.txt @@ -105,7 +105,7 @@ prt_church,100,123,4 script Vomars 1_M_PASTOR,{ npctalk "Ladies and gentlemen, "+strcharinfo(PC_NAME)+" has an objection to the wedding!"; SF_wed_end(); mes "Why should they not be wed?"; - input $@msg$; + input($@msg$); npctalk strcharinfo(PC_NAME)+"'s objection is: "+$@msg$; emotion e_sob; mes "I see..."; diff --git a/npc/custom/etc/monster_arena.txt b/npc/custom/etc/monster_arena.txt index 8420cd544..249e5518d 100644 --- a/npc/custom/etc/monster_arena.txt +++ b/npc/custom/etc/monster_arena.txt @@ -322,10 +322,11 @@ L_Sell: mes "You have: ^FF0000" + #monpoints + "^000000 experience points"; mes "How many would you like to sell?"; next; - input @sellexp; - if (@sellexp > #monpoints) goto L_NoExp; - set #monpoints,#monpoints-@sellexp; - set @sellearn,100*@sellexp; // Price of exp + input(@sellexp, 0); + if (@sellexp > #monpoints) + goto L_NoExp; + #monpoints -= @sellexp; + @sellearn = 100 * @sellexp; // Price of exp Zeny += @sellearn; mes "[Monster Trainer]"; mes "You earned ^0000FF" + @sellearn + "^000000z."; diff --git a/npc/custom/etc/quest_warper.txt b/npc/custom/etc/quest_warper.txt index 35b863e9d..ce0897f69 100644 --- a/npc/custom/etc/quest_warper.txt +++ b/npc/custom/etc/quest_warper.txt @@ -82,7 +82,7 @@ function script Q_Warpra { case 2: warp $QW_SP_WarpMap$, $QW_SP_WarpX, $QW_SP_WarpY; close2; - debugmes "Please check your special warp menu settings on the Warpra."; + consolemes(CONSOLEMES_WARNING, "Please check your special warp menu settings on the Warpra."); end; case 3: goto L_town; case 4: goto L_dungeon; @@ -173,19 +173,19 @@ Setprice: next; mes "Basic - Warps are = "+(($QW_BW_PRICE)?"^00FF00"+$QW_BW_PRICE:"^FF0000Free")+"^000000"; mes "Basic - Warps are starter towns and related dungeons."; - input $QW_BW_PRICE; + input($QW_BW_PRICE, 0); goto Setprice; case 2: next; mes "Advanced - Warps are = "+(($QW_AW_PRICE)?"^00FF00"+$QW_AW_PRICE:"^FF0000Free")+"^000000"; mes "Advanced - Warps are towns and dungeons on the same island but not close to any starter town."; - input $QW_AW_PRICE; + input($QW_AW_PRICE, 0); goto Setprice; case 3: next; mes "Overseas - Warps are = "+(($QW_OW_PRICE)?"^00FF00"+$QW_OW_PRICE:"^FF0000Free")+"^000000"; mes "Overseas - Warps are towns and dungeons overseas reachable by boat from Alberta."; - input $QW_OW_PRICE; + input($QW_OW_PRICE, 0); goto Setprice; case 4: next; @@ -193,7 +193,7 @@ Setprice: mes "Basic - Warps are starter town related dungeons."; mes "Dungeon warp fees are calculated by maps away from entrance of the dungeon times Dungeon warp fee."; mes "These costs are on top of the regular Warp costs."; - input $QW_BW_FEE; + input($QW_BW_FEE, 0); goto Setprice; case 5: next; @@ -201,7 +201,7 @@ Setprice: mes "Advanced - Warps are dungeons not close to any starter town."; mes "Dungeon warp fees are calculated by maps away from entrance of the dungeon times Dungeon warp fee."; mes "These costs are on top of the regular Warp costs."; - input $QW_AW_FEE; + input($QW_AW_FEE, 0); goto Setprice; case 6: next; @@ -209,13 +209,13 @@ Setprice: mes "Overseas - Warps are dungeons related to towns overseas reachable by boat from Alberta."; mes "Dungeon warp fees are calculated by maps away from entrance of the dungeon times Dungeon warp fee."; mes "These costs are on top of the regular Warp costs."; - input $QW_OW_FEE; + input($QW_OW_FEE, 0); goto Setprice; case 7: next; mes "Full Healing = "+(($QW_HF_PRICE)?"^00FF00"+$QW_HF_PRICE:"^FF0000Free")+"^000000"; mes "Instant full healing 1 price."; - input $QW_HF_PRICE; + input($QW_HF_PRICE, 0); goto Setprice; case 8: next; @@ -224,8 +224,8 @@ Setprice: mes "Healing price per 1 HP."; mes "Healing price per 1 SP."; mes "2 inputs, first HP then SP."; - input $QW_HP_H_PRICE; - input $QW_HP_S_PRICE; + input($QW_HP_H_PRICE, 0); + input($QW_HP_S_PRICE, 0); goto Setprice; case 9: next; @@ -233,13 +233,13 @@ Setprice: if (!$QW_S_PRICE) mes "Storage = ^FF0000 Free ^000000"; if ($QW_S_PRICE == 60) mes "Storage = ^0000FF Kafra Mode ^000000"; mes "Storage cost, if set to 60 Kafra pricing will be handled."; - input $QW_S_PRICE; + input($QW_S_PRICE, 0); goto Setprice; case 10: next; mes "Guild Storage = "+(($QW_GS_PRICE)?"^00FF00"+$QW_GS_PRICE:"^FF0000Free")+"^000000"; mes "Guild Storage, free on Guild Kafras."; - input $QW_GS_PRICE; + input($QW_GS_PRICE, 0); goto Setprice; case 11: goto GM_Menu; @@ -264,21 +264,21 @@ SpecialWarpMenu: case 1: next; mes "Set the name to show in the menu as option."; - input $QW_SP_Warpname$; + input($QW_SP_Warpname$, 0); goto SpecialWarpMenu; case 2: next; mes "Set the map in the ^0000FFmapname^000000 format."; mes "When this warpmap is set the option for players will show once they meet the requirments."; mes "To disable Special Warp Menu option, clear this!"; - input $QW_SP_WarpMap$; + input($QW_SP_WarpMap$, 0); goto SpecialWarpMenu; case 3: next; mes "First input = Xcoord"; mes "Second input = Ycoord"; - input $QW_SP_WarpX; - input $QW_SP_WarpY; + input($QW_SP_WarpX, 0); + input($QW_SP_WarpY, 0); goto SpecialWarpMenu; case 4: goto GM_Menu; @@ -301,7 +301,7 @@ DungeonLevelLimit: mes "Set limit of Dungeon Depth 0 = entrance"; mes "Depth 1 is a map connected to 0 and so on"; mes "Shortest Route to map counts as depth"; - input $QW_DDL; + input($QW_DDL, 0); goto DungeonLevelLimit; case 3: goto GM_Menu; default: @@ -464,7 +464,7 @@ L_Storage: if(#kafra_code) { mes "Enter your storage password:"; set @code_,0; - input @code_; + input(@code_, 0); if(@code_ != #kafra_code) { dispbottom "Wrong storage password."; close; @@ -495,7 +495,7 @@ L_GStorage: if ($QW_KPoint == 1) set RESRVPTS, RESRVPTS + ($QW_GS_PRICE/5); next; mes "[Warpra]"; - mes "Close this window and I will open the ^5533FF" + getguildname(@GID) + "^000000 storage."; + mes "Close this window and I will open the ^5533FF" + getguildinfo(GUILDINFO_NAME, @GID) + "^000000 storage."; close2; guildopenstorage; end; @@ -1533,7 +1533,7 @@ function script QWS_Dungeon_Warpra { mes "[Warpra]"; mes "Sorry, I can only unlock this location."; } else - debugmes "QWS_Dungeon_Warpra error, improper syntax?"; + consolemes(CONSOLEMES_ERROR, "QWS_Dungeon_Warpra error, improper syntax?"); return; function QWS_D_setbin { @@ -1577,7 +1577,7 @@ function script QWS_Town_Warpra { } else if (QWS_T_getbin(getarg(0)) == 1) { callfunc "Q_Warpra",0; } else - debugmes "QWS_Town_Warpra error, improper syntax ?"; + consolemes(CONSOLEMES_ERROR, "QWS_Town_Warpra error, improper syntax ?"); return; function QWS_T_setbin { diff --git a/npc/custom/etc/shifty_assassin.txt b/npc/custom/etc/shifty_assassin.txt index 4acf7c8ac..cc92d3fce 100644 --- a/npc/custom/etc/shifty_assassin.txt +++ b/npc/custom/etc/shifty_assassin.txt @@ -27,7 +27,7 @@ morocc,148,86,5 script Shifty Assassin 4_F_JOB_ASSASSIN,{ mes "They cost ^0000FF" + $ninja_price + " zeny ^000000each."; set @buy,0; - input @buy; + input(@buy, 0); next; if ($ninja_avail < 1) { mes "[Shifty Assassin]"; @@ -83,8 +83,7 @@ morocc,148,86,5 script Shifty Assassin 4_F_JOB_ASSASSIN,{ mes "Active Ninjas: "+#ninjas; mes "Resting Ninjas: "+#ninjasr; mes "How many do you want to send?"; - set @number,0; - input @number; + input(@number); if (@number < 1) { mes "[Shifty Assassin]"; mes "You can't kill anyone without ninjas."; @@ -144,7 +143,7 @@ morocc,148,86,5 script Shifty Assassin 4_F_JOB_ASSASSIN,{ mes "How many ninjas do you want to make available?"; next; set @add,0; - input @add; + input(@add, 0); set $ninja_avail,$ninja_avail+@add; mes @add + " ninjas added."; close; diff --git a/npc/custom/etc/stock_market.txt b/npc/custom/etc/stock_market.txt index 465840dfe..b761d8d16 100644 --- a/npc/custom/etc/stock_market.txt +++ b/npc/custom/etc/stock_market.txt @@ -323,11 +323,8 @@ prontera,140,181,5 script Stock Market::stockmarket 4_M_MANAGER,{ mes "Enter the name of the share company"; mes "Transaction fee of ^FF0000" + $S_Trans + "z^000000 will apply."; - set @buyname$,"0"; - input @buyname$; - - set @buyamount,0; - input @buyamount; + input(@buyname$); + input(@buyamount); // Checks valid number // if (@buyamount < $S_BuyMin) { mes "^FF0000Minimum of " + $S_BuyMin + " shares can be bought at a time.^000000"; @@ -476,10 +473,8 @@ prontera,140,181,5 script Stock Market::stockmarket 4_M_MANAGER,{ if (#S8 > 0) mes "^0000FF"+$S8N$+"^FF0000" + " x " + #S8 + " [" + $S8 + "z]"; if (#S9 > 0) mes "^0000FF"+$S9N$+"^FF0000" + " x " + #S9 + " [" + $S9 + "z]"; if (#S10 > 0) mes "^0000FF"+$S10N$+"^FF0000" + " x " + #S10 + " [" + $S10 + "z]"; - set @sellname$,"0"; - input @sellname$; - set @sellamount,0; - input @sellamount; + input(@sellname$); + input(@sellamount); if (@sellamount < 1) { mes "^FF0000Invalid integer.^000000"; next; @@ -756,7 +751,7 @@ OnGMOpen: if (select("Yes", "No") != 1) return; set @gmset,0; - input @gmset; + input(@gmset, 0); set $S1,@gmset; set $S2,@gmset; set $S3,@gmset; diff --git a/npc/custom/events/cluckers.txt b/npc/custom/events/cluckers.txt index 7047ca00e..2e6170693 100644 --- a/npc/custom/events/cluckers.txt +++ b/npc/custom/events/cluckers.txt @@ -74,11 +74,11 @@ prontera,156,219,4 script Cluckers 4_NFCOCK,{ case 3: mes "[Cluckers]"; mes "Cluck cluck? Cluck??? ^FF0000~What should the prize for winning be? Please input the ID.~^000000"; - input $cluck_item_id; + input($cluck_item_id, 0); next; mes "[Cluckers]"; mes "Cluck? cluuuck? ^FF0000~How many if this item should I give away?~^000000"; - input $cluck_item_amount; + input($cluck_item_amount, 0); next; mes "[Cluckers]"; mes "Cluck cluck..? Cluck. ^FF0000~So, the prize is^000000 ^008000"+ $cluck_item_amount +" "+ getitemname($cluck_item_id) +"^000000? ^FF0000Great.~^000000"; diff --git a/npc/custom/events/disguise.txt b/npc/custom/events/disguise.txt index fde5e544a..37f8a4f99 100644 --- a/npc/custom/events/disguise.txt +++ b/npc/custom/events/disguise.txt @@ -67,7 +67,7 @@ prontera,160,155,4 script Disguise Event 4_M_NFDEADMAN,{ mes "Input the number of rounds you want the event to last."; mes "Current number: [^0000FF"+.Rounds+"^000000]"; next; - input .@Rounds; + input(.@Rounds, 0); set .Rounds,.@Rounds; mes .@n$; mes "The number of rounds has been changed to "+.Rounds+"."; @@ -77,7 +77,7 @@ prontera,160,155,4 script Disguise Event 4_M_NFDEADMAN,{ mes "Input the Item ID of the prize given each round."; mes "Current item: [^0000FF"+getitemname(.Prize)+"^000000] (ID #"+.Prize+")"; next; - input .@Prize; + input(.@Prize, 0); mes .@n$; if (getitemname(.@Prize)=="" || getitemname(.@Prize)=="null") { mes "That item does not exist. Please try again."; @@ -86,11 +86,11 @@ prontera,160,155,4 script Disguise Event 4_M_NFDEADMAN,{ set .Prize,.@Prize; mes "Input the amount to be given."; next; - input .@amount; + input(.@amount); mes .@n$; - if (.@amount<=0 || .@amount>=10000) { + if (.@amount <= 0 || .@amount >= 10000) { mes "That amount is invalid. Using default ammount of 1."; - set .@amount,1; + .@amount = 1; next; mes .@n$; } diff --git a/npc/custom/events/mushroom_event.txt b/npc/custom/events/mushroom_event.txt index b9c54c09e..fc7446814 100644 --- a/npc/custom/events/mushroom_event.txt +++ b/npc/custom/events/mushroom_event.txt @@ -41,7 +41,7 @@ OnMinute10: // Start time (every hour) set .status,1; set .Spawn,rand(1,10); // How many Mushrooms should spawn? set .Map$,.maps$[rand(getarraysize(.maps$))]; - killmonster .Map$,"All"; + killmonster(.Map$, "all"); monster .Map$,0,0,"Please don't kill me!",1084,.Spawn,strnpcinfo(NPC_NAME)+"::OnMobKilled"; announce "Find the Mushroom : Total of "+.Spawn+" Mushrooms have been spawned in "+.Map$+"!",0; sleep 2500; @@ -50,9 +50,12 @@ OnMinute10: // Start time (every hour) OnMobKilled: set .Spawn, .Spawn - 1; - getitem .Prize, .Amount; - if (.Spawn) announce "[ "+strcharinfo(PC_NAME)+" ] has killed a Mushroom. There are now "+.Spawn+" Mushroom(s) left.",bc_map; - else { + if (playerattached() != 0) { + getitem .Prize, .Amount; + if (.Spawn) + announce "[ "+strcharinfo(PC_NAME)+" ] has killed a Mushroom. There are now "+.Spawn+" Mushroom(s) left.",bc_map; + } + if (!.Spawn) { announce "The Find the Mushroom Event has ended. All the Mushrooms have been killed.",0; set .status,0; } diff --git a/npc/custom/events/valentinesdayexp.txt b/npc/custom/events/valentinesdayexp.txt index 33339dcd9..195f20275 100644 --- a/npc/custom/events/valentinesdayexp.txt +++ b/npc/custom/events/valentinesdayexp.txt @@ -95,12 +95,15 @@ alberta,26,243,4 script Stephen#val1 1_M_MERCHANT,{ mes "you can come back again."; mes "So how many do you want?"; next; - set @needmon,0; - input @flag_num; - if (@flag_num <= 0) goto L_NONE; - if (@flag_num > 5) goto L_ERR; - set @needmon,@flag_num*5000; - if (Zeny < @needmon) goto L_NOTENO; + @needmon = 0; + input(@flag_num); + if (@flag_num <= 0) + goto L_NONE; + if (@flag_num > 5) + goto L_ERR; + @needmon = @flag_num * 5000; + if (Zeny < @needmon) + goto L_NOTENO; Zeny -= @needmon; getitem 558,@flag_num; mes "[Stephen]"; @@ -154,13 +157,17 @@ alberta,29,243,4 script Jainie#val1 1_M_INNKEEPER,{ mes "you can come back again."; mes "So how many do you want? 1 portion is 4500z + 1 Milk."; next; - set @needmon,0; - input @flag_num; - if (@flag_num == 0) goto L_NONE; - if (@flag_num > 5) goto L_ERR; - set @needmon,@flag_num*4500; - if (Zeny < @needmon) goto L_NOTENO; - if (countitem(Milk) < @flag_num) goto L_NOMILK; + @needmon = 0; + input(@flag_num); + if (@flag_num == 0) + goto L_NONE; + if (@flag_num > 5) + goto L_ERR; + @needmon = @flag_num * 4500; + if (Zeny < @needmon) + goto L_NOTENO; + if (countitem(Milk) < @flag_num) + goto L_NOMILK; Zeny -= @needmon; delitem 519,@flag_num; getitem 561,@flag_num; diff --git a/npc/custom/expandedbartershop.txt b/npc/custom/expandedbartershop.txt new file mode 100644 index 000000000..5ba988ad9 --- /dev/null +++ b/npc/custom/expandedbartershop.txt @@ -0,0 +1,63 @@ +//===== Hercules Script ====================================== +//= Expanded barter shop demo +//===== By: ================================================== +//= 4144 +//===== Current Version: ===================================== +//= 1.0 +//===== Description: ========================================= +//= Expanded barter shop demo in prontera. +//============================================================ + +prontera,160,284,4 trader Expanded Barter Shop#prt 4_M_KID1,{ + end; +OnInit: + tradertype(NST_EXPANDED_BARTER); + + // Selling Orange_Potion with items price and 4 items price + startsellitem(Orange_Potion, 2, 100000); + sellitemcurrency(Banana, 2); + sellitemcurrency(Apple, 1); + sellitemcurrency(Carrot, 2); + sellitemcurrency(Sweet_Potato, 1); + endsellitem(); + + // sell item with price only in zeny + sellitem(White_Herb, 1, 100); + // sell item with zeny and item price + sellitem(Blue_Herb, 22, 200, Orange_Potion, 2, 3); + + // sell item with price only in zeny (infinite amount) + sellitem(Green_Herb, 3, -1); + + // sell item with zeny and two items price (1) + sellitem(Orange_Potion, 20, 100000, Banana, 2, -1, Berserk_Potion, 10, -1); + + // sell item with zeny and two items price (same as before but with different zeny price) + sellitem(Orange_Potion, 1, 100000, Banana, 2, -1, Berserk_Potion, 10, -1); + + // sell item with item price + sellitem(Blade, 0, 1000, Sword, 2, -1); + + // sell item with zeny and two items price + sellitem(Scimiter, 2000, -1, Sword, 1, 2, Sword, 1, 5); + + // sell item with zeny and two items price (selling another Orange_Potion) + sellitem(Orange_Potion, 1, 100000, Green_Herb, 2, -1); + + // modify selling Orange_Potion with items price (same as previous) + // modification reset amount stored in db + startsellitem(Orange_Potion, 1, 100); + sellitemcurrency(Green_Herb, 2); + endsellitem(); + + // sell item with zeny and item price (selling another White_Herb) + sellitem(White_Herb, 10, 100, Banana, 1, -1); + + // stop selling blades +// stopselling(Blade, 1); + + // sell item with zeny and two items price (modify amount for entry (1)) +// sellitem(Orange_Potion, 1, 200000, Banana, 2, -1, Berserk_Potion, 10, -1); + + end; +} diff --git a/npc/custom/itembind.txt b/npc/custom/itembind.txt index 7d95afdfc..f0e128453 100644 --- a/npc/custom/itembind.txt +++ b/npc/custom/itembind.txt @@ -25,7 +25,7 @@ prontera,144,174,4 script Bound Items 4_M_JP_MID,{ } mes "What kind of bind?"; .@boundtype = 1 << (select("Account", "Guild", "Character")-1); - if(.@boundtype == 2 && (!getcharid(CHAR_ID_GUILD) || getguildmaster(getcharid(CHAR_ID_GUILD)) != strcharinfo(PC_NAME))) { + if(.@boundtype == IBT_GUILD && (!getcharid(CHAR_ID_GUILD) || getguildinfo(GUILDINFO_MASTER_NAME, getcharid(CHAR_ID_GUILD)) != strcharinfo(PC_NAME))) { mes "In order for me to bind an item to a guild you must be the master of one."; close; } @@ -68,7 +68,7 @@ prontera,144,174,4 script Bound Items 4_M_JP_MID,{ mes "You don't have any bound items in your inventory. Not much I can do here."; close; } - countbound(2); + countbound(IBT_GUILD); if(.unbindprice) { mes "Unbinding an item has a fee of ^0000FF"+.unbindprice+"^000000 zeny."; if(Zeny < .unbindprice) { @@ -88,7 +88,7 @@ prontera,144,174,4 script Bound Items 4_M_JP_MID,{ next; for(.@i = 0; .@i < getarraysize(@bound_items); .@i++) { if(@inventorylist_id[.@item] == @bound_items[.@i] && - (!getcharid(CHAR_ID_GUILD) || getguildmaster(getcharid(CHAR_ID_GUILD)) != strcharinfo(PC_NAME)) + (!getcharid(CHAR_ID_GUILD) || getguildinfo(GUILDINFO_MASTER_NAME, getcharid(CHAR_ID_GUILD)) != strcharinfo(PC_NAME)) ) { mes "I will only unbind guild bound items that the guild master requests."; close; @@ -127,8 +127,8 @@ OnInit: .logbinds = 1; //Other stuff - .boundtypes$[1] = "account"; - .boundtypes$[2] = "guild"; - .boundtypes$[4] = "character"; + .boundtypes$[IBT_ACCOUNT] = "account"; + .boundtypes$[IBT_GUILD] = "guild"; + .boundtypes$[IBT_CHARACTER] = "character"; end; } diff --git a/npc/custom/quests/quest_shop.txt b/npc/custom/quests/quest_shop.txt index 739b53c02..c2481e991 100644 --- a/npc/custom/quests/quest_shop.txt +++ b/npc/custom/quests/quest_shop.txt @@ -170,13 +170,13 @@ OnEnd: function Add { if (getitemname(getarg(1)) == "null") { - debugmes "Quest reward #"+getarg(1)+" invalid (skipped)."; + consolemes(CONSOLEMES_WARNING, "Quest reward #"+getarg(1)+" invalid (skipped)."); return; } setarray .@j[0],getarg(2),getarg(3),getarg(4); for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) { if (getitemname(getarg(.@i)) == "null") { - debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped)."; + consolemes(CONSOLEMES_WARNING, "Quest requirement #"+getarg(.@i)+" invalid (skipped)."); return; } else setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1); diff --git a/npc/custom/quests/thq/THQS_TTShop.txt b/npc/custom/quests/thq/THQS_TTShop.txt index 96e7346d3..4c12f9938 100644 --- a/npc/custom/quests/thq/THQS_TTShop.txt +++ b/npc/custom/quests/thq/THQS_TTShop.txt @@ -93,7 +93,7 @@ function script thqs_trade_token { // getarg(1) - .@mp$ -> PRICE function script thqs_menu_buy { if( getargcount() != 2 ) { - debugmes "thqs_menu_buy: Wrong number of arguments!!"; + consolemes(CONSOLEMES_ERROR, "thqs_menu_buy: Wrong number of arguments!!"); close; } @@ -101,7 +101,7 @@ function script thqs_menu_buy { .@mp$ = getarg(1); if( getarraysize( getd(.@mw$) ) != getarraysize( getd(.@mp$) ) ) { - debugmes "thqs_menu_buy: Missing entries in data!"; + consolemes(CONSOLEMES_ERROR, "thqs_menu_buy: Missing entries in data!"); close; } diff --git a/npc/custom/stylist.txt b/npc/custom/stylist.txt index 0ee7d8822..188a91ca7 100644 --- a/npc/custom/stylist.txt +++ b/npc/custom/stylist.txt @@ -3,32 +3,72 @@ //===== By: ================================================== //= Euphy //===== Current Version: ===================================== -//= 1.1 +//= 1.2 //===== Description: ========================================= //= Changes your hair style, hair color, and cloth color. //===== Additional Comments: ================================= //= 1.1 Switched to 'getbattleflag', credits to Saithis. [Euphy] +//= 1.2 Fix style start at min_style, add Job_Summoner [AnnieRuru] //============================================================ prontera,170,180,1 script Stylist#custom_stylist 2_M_DYEINGER,{ - - setarray .@styles[1],getbattleflag("max_cloth_color"),getbattleflag("max_hair_style"),getbattleflag("max_hair_color"); - setarray .@Look[1],7,1,6; - set .@s, select(" ~ Cloth color", " ~ Hairstyle", " ~ Hair color"); - set .@Revert, getlook(.@Look[.@s]); - set .@style,1; - while(1) { - setlook .@Look[.@s], .@style; - message strcharinfo(PC_NAME),"This is style #"+.@style+"."; - set .@menu$, " ~ Next (^0055FF"+((.@style!=.@styles[.@s])?.@style+1:1)+"^000000): ~ Previous (^0055FF"+((.@style!=1)?.@style-1:.@styles[.@s])+"^000000): ~ Jump to...: ~ Revert to original (^0055FF"+.@Revert+"^000000)"; - switch(select(.@menu$)) { - case 1: set .@style, ((.@style!=.@styles[.@s])?.@style+1:1); break; - case 2: set .@style, ((.@style!=1)?.@style-1:.@styles[.@s]); break; - case 3: message strcharinfo(PC_NAME),"Choose a style between 1 - "+.@styles[.@s]+"."; - input .@style,0,.@styles[.@s]; - if (!.@style) set .@style, rand(1,.@styles[.@s]); - break; - case 4: set .@style, .@Revert; setlook .@Look[.@s], .@Revert; break; + .@choose = select("Hair style", "Hair color", "Cloth color") - 1; + .@part = .look[.@choose]; + if (BaseClass != Job_Summoner) + callsub(L_styles, .@part, .minstyle[.@part], .maxstyle[.@part]); + else + callsub(L_styles, .@part, .summoner_minstyle[.@part], .summoner_maxstyle[.@part]); +L_styles: + .@lookpart = getarg(0); + .@minstyle = getarg(1); + .@maxstyle = getarg(2); + .@i = .@revert = getlook(.@lookpart); + while (true) { + setlook(.@lookpart, .@i); + message(strcharinfo(PC_NAME), sprintf(_("This is style #%d."), .@i)); + if (.@i == .@maxstyle) + .@next = .@minstyle; + else + .@next = .@i + 1; + if (.@i == .@minstyle) + .@previous = .@maxstyle; + else + .@previous = .@i - 1; + switch(select( + sprintf(_(" ~ Next (%s%d%s)"), F_MesColor(C_BLUE), .@next, F_MesColor(C_BLACK)), + sprintf(_(" ~ Previous (%s%d%s)"), F_MesColor(C_BLUE), .@previous, F_MesColor(C_BLACK)), + " ~ Jump to...", + sprintf(_(" ~ Revert to original (%s%d%s)"), F_MesColor(C_BLUE), .@revert, F_MesColor(C_BLACK)))) { + case 1: + .@i = .@next; + break; + case 2: + .@i = .@previous; + break; + case 3: + message(strcharinfo(PC_NAME), sprintf(_("Choose a style between %d - %d."), .@minstyle, .@maxstyle)); + input(.@i, .@minstyle, .@maxstyle); + break; + case 4: + .@i = .@revert; } } + end; +OnInit: + setarray .look[0], LOOK_HAIR, LOOK_HAIR_COLOR, LOOK_CLOTHES_COLOR; + + .minstyle[LOOK_HAIR] = getbattleflag("min_hair_style"); + .maxstyle[LOOK_HAIR] = getbattleflag("max_hair_style"); + .minstyle[LOOK_HAIR_COLOR] = getbattleflag("min_hair_color"); + .maxstyle[LOOK_HAIR_COLOR] = getbattleflag("max_hair_color"); + .minstyle[LOOK_CLOTHES_COLOR] = getbattleflag("min_cloth_color"); + .maxstyle[LOOK_CLOTHES_COLOR] = getbattleflag("max_cloth_color"); + + .summoner_minstyle[LOOK_HAIR] = getbattleflag("min_hair_style"); + .summoner_maxstyle[LOOK_HAIR] = getbattleflag("max_hair_style"); + .summoner_minstyle[LOOK_HAIR_COLOR] = getbattleflag("min_hair_color"); + .summoner_maxstyle[LOOK_HAIR_COLOR] = getbattleflag("max_hair_color"); + .summoner_minstyle[LOOK_CLOTHES_COLOR] = getbattleflag("min_cloth_color"); + .summoner_maxstyle[LOOK_CLOTHES_COLOR] = getbattleflag("max_cloth_color"); + end; } diff --git a/npc/custom/woe_controller.txt b/npc/custom/woe_controller.txt index 5f619c1db..e9139c0ce 100644 --- a/npc/custom/woe_controller.txt +++ b/npc/custom/woe_controller.txt @@ -149,7 +149,7 @@ OnMinute00: function Disp_Owner { set .@o, getcastledata(getarg(0),1); - if (.@o) announce "The ["+getcastlename(getarg(0))+"] castle "+((getarg(1))?"has been conquered":"is currently held")+" by the ["+getguildname(.@o)+"] guild.",bc_all|bc_woe; + if (.@o) announce "The ["+getcastlename(getarg(0))+"] castle "+((getarg(1))?"has been conquered":"is currently held")+" by the ["+getguildinfo(GUILDINFO_NAME, .@o)+"] guild.",bc_all|bc_woe; else announce "The ["+getcastlename(getarg(0))+"] castle is currently unoccupied.",bc_all|bc_woe; return; } @@ -275,7 +275,7 @@ while(1) { mes "> ^FF0000"+.Regions$[.@i]+"^000000"; for(set .@j,.@k; .@j<(.@k+5); set .@j,.@j+1) { set .@t, getcastledata(.Castles$[.@j],1); - mes " ~ "+getcastlename(.Castles$[.@j])+": "+((.@t)?"^0055FF"+getguildname(.@t):"^777777unoccupied")+"^000000"; + mes " ~ "+getcastlename(.Castles$[.@j])+": "+((.@t)?"^0055FF"+getguildinfo(GUILDINFO_NAME, .@t):"^777777unoccupied")+"^000000"; } if (.@i < 5) mes " "; } |