diff options
52 files changed, 4163 insertions, 1632 deletions
diff --git a/conf/map/battle/items.conf b/conf/map/battle/items.conf index 3c9ba71e9..c7aa99245 100644 --- a/conf/map/battle/items.conf +++ b/conf/map/battle/items.conf @@ -118,3 +118,7 @@ unequip_restricted_equipment: 0 // When unequip a bow with arrow equipped, it also unequip the arrow? // Default: true (Official behavior, applies only in Renewal) bow_unequip_arrow: true + +// How much should rental mounts increase a player's movement speed? (Note 2) +// Official: 25 (Default) +boarding_halter_speed: 25 diff --git a/conf/map/battle/player.conf b/conf/map/battle/player.conf index 39e1d9287..de8ef6f69 100644 --- a/conf/map/battle/player.conf +++ b/conf/map/battle/player.conf @@ -140,6 +140,15 @@ max_cart_weight: 8000 // Prevent logout of players after being hit for how long (in ms, 0 disables)? prevent_logout: 10000 +// When should the server prevent a player from logging out? Have no effect if prevent_logout is disabled. (Note 3) +// Official servers prevent players from logging out after attacking, casting skills, and taking damage. +// 0 = Players can always logout +// 1 = Prevent logout on login +// 2 = Prevent logout after attacking +// 4 = Prevent logout after casting skill +// 8 = Prevent logout after being hit +prevent_logout_trigger: 14 + // Display the drained hp/sp values from normal attacks? (Ie: Hunter Fly card) show_hp_sp_drain: false diff --git a/conf/map/battle/skill.conf b/conf/map/battle/skill.conf index 8d7c9df44..b88c5d141 100644 --- a/conf/map/battle/skill.conf +++ b/conf/map/battle/skill.conf @@ -284,7 +284,7 @@ sg_miracle_skill_duration: 3600000 sg_angel_skill_ratio: 10 // Skills that bHealPower has effect on -// 1: Heal, 2: Sanctuary, 4: Potion Pitcher, 8: Slim Pitcher, 16: Apple of Idun +// 1: Heal, 2: Sanctuary, 4: Potion Pitcher, 8: Slim Pitcher, 16: Apple of Idun, 32: Highness Heal skill_add_heal_rate: 7 // Whether the damage of EarthQuake with a single target on screen is able to be reflected. diff --git a/conf/messages.conf b/conf/messages.conf index efc8d8a36..768bee777 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -51,7 +51,8 @@ 23: Job level can't go any higher. 24: Job level raised. 25: Job level lowered. -//26-27 FREE +26: [%d] seconds left until you can use +//27 FREE 28: No player found. 29: 1 player found. 30: %d players found. @@ -72,7 +73,8 @@ 45: Guild level change failed. 46: %s recalled! 47: Base level can't go any higher. -//48-52 FREE +48: Any work in progress (NPC dialog, manufacturing ...) quit and try again. +//49-52 FREE 53: '%s' stats: 54: No player found in map '%s'. 55: 1 player found in map '%s'. diff --git a/db/constants.conf b/db/constants.conf index 79530e7d1..d108e0976 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -3504,6 +3504,51 @@ constants_db: { 4_F_REBELLION2: 10201 4_F_REBELLION3: 10202 4_M_ILYA: 10203 + // Free ID - 10204 + 4_ELDER: 10205 + 4_LUNATIC: 10206 + 4_F_NOVICE2: 10207 + 4_WICKEDNYMPH: 10208 + 4_F_PREMI: 10209 + 4_M_COSTELL: 10210 + 4_M_YATTWARP: 10211 + 4_M_EVOKASCUDI: 10212 + 4_M_JOHNNYJAMES: 10213 + 4_M_ALBERTFORD: 10214 + 4_M_SEANMCCURDY: 10215 + 4_M_KARAMPUCCI: 10216 + 4_M_CACTUSMAN1: 10217 + 4_M_CACTUSMAN2: 10218 + 4_M_CACTUSMAN3: 10219 + 4_M_CACTUSLADY: 10220 + 4_M_GAST: 10221 + 4_M_CACTUSCHILD: 10222 + 4_KING: 10223 + 4_F_BOMI: 10224 + 4_M_CACTUSCHIEF: 10225 + 4_F_CACTUSCHILD2: 10226 + 4_F_CACTUSLADY2: 10227 + 4_F_CACTUSLADY3: 10228 + 4_M_CACTUS: 10229 + 4_M_COWRAIDERS1: 10230 + 4_M_COWRAIDERS2: 10231 + 4_M_COWRAIDERS3: 10232 + 4_F_JP14THEVT: 10233 + 4_M_POORSCHOLAR: 10234 + 4_M_PEPPERROTI: 10235 + JP_NPC01: 10236 + 4_PURPLE_WARP: 10237 + 4_F_NARIN: 10238 + 4_M_URGENT_MAN: 10239 + 4_M_KEEN_SOLDIER: 10240 + 4_F_SLOPPY_WOMAN: 10241 + 4_F_DRKAFRA01: 10242 + 4_M_DRZONDA01: 10243 + 4_M_SWD_RENO: 10244 + 4_M_KNG_RENO: 10245 + 4_M_AC_RUMIN: 10246 + 4_M_HIGH_WIZARD: 10247 + 4_SYSTEM_BOX: 10248 comment__: "Mercenary IDs" MER_LIF: 6001 @@ -3699,7 +3744,7 @@ constants_db: { MOUNT_DRAGON_BLUE: 7 MOUNT_DRAGON_RED: 8 - comment__: "gettime" + comment__: "Gettime Types" GETTIME_SECOND: 1 GETTIME_MINUTE: 2 GETTIME_HOUR: 3 @@ -3722,7 +3767,14 @@ constants_db: { UNITTYPE_HOM: 4 UNITTYPE_MER: 5 UNITTYPE_ELEM: 6 - + + comment__: "Unit AI Types" + AI_NONE: 0 //0: Normal mob. + AI_ATTACK: 1 //1: Standard summon, attacks mobs. + AI_SPHERE: 2 //2: Alchemist Marine Sphere + AI_FLORA: 3 //3: Alchemist Summon Flora + AI_ZANZOU: 4 //4: Summon Zanzou + comment__: "Colors" C_AQUA: 0x00FFFF C_BLACK: 0x000000 @@ -3749,4 +3801,61 @@ constants_db: { comment__: "Genders" SEX_FEMALE: 0 SEX_MALE: 1 + + comment__: "Script Unit Data Types" + UDT_TYPE: 0 + UDT_SIZE: 1 + UDT_LEVEL: 2 + UDT_HP: 3 + UDT_MAXHP: 4 + UDT_SP: 5 + UDT_MAXSP: 6 + UDT_MASTERAID: 7 + UDT_MASTERCID: 8 + UDT_MAPIDXY: 9 + UDT_WALKTOXY: 10 + UDT_SPEED: 11 + UDT_MODE: 12 + UDT_AI: 13 + UDT_SCOPTION: 14 + UDT_SEX: 15 + UDT_CLASS: 16 + UDT_HAIRSTYLE: 17 + UDT_HAIRCOLOR: 18 + UDT_HEADBOTTOM: 19 + UDT_HEADMIDDLE: 20 + UDT_HEADTOP: 21 + UDT_CLOTHCOLOR: 22 + UDT_SHIELD: 23 + UDT_WEAPON: 24 + UDT_LOOKDIR: 25 + UDT_CANMOVETICK: 26 + UDT_STR: 27 + UDT_AGI: 28 + UDT_VIT: 29 + UDT_INT: 30 + UDT_DEX: 31 + UDT_LUK: 32 + UDT_ATKRANGE: 33 + UDT_ATKMIN: 34 + UDT_ATKMAX: 35 + UDT_MATKMIN: 36 + UDT_MATKMAX: 37 + UDT_DEF: 38 + UDT_MDEF: 39 + UDT_HIT: 40 + UDT_FLEE: 41 + UDT_PDODGE: 42 + UDT_CRIT: 43 + UDT_RACE: 44 + UDT_ELETYPE: 45 + UDT_ELELEVEL: 46 + UDT_AMOTION: 47 + UDT_ADELAY: 48 + UDT_DMOTION: 49 + UDT_HUNGER: 50 + UDT_INTIMACY: 51 + UDT_LIFETIME: 52 + UDT_MERC_KILLCOUNT: 53 + UDT_STATADD: 54 } diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index a681d5753..cfa7cb7d1 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -1197,6 +1197,9 @@ item_db: ( Buy: 2000 Weight: 100 BuyingStore: true + Nouse: { + sitting: true + } Script: <" itemskill SM_ENDURE,1; "> }, { @@ -1207,6 +1210,9 @@ item_db: ( Buy: 1500 Weight: 100 BuyingStore: true + Nouse: { + sitting: true + } Script: <" itemskill SM_SELFPROVOKE,1; "> }, { @@ -74741,11 +74747,15 @@ item_db: ( Name: "Paralyze" Type: 0 Buy: 2 - Weight: 100 + Weight: 20 + Job: { + Assassin: true + } + Upper: 8 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_PARALYSE,300000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_PARALYSE, 300000, 0, 10, SCFLAG_FIXEDTICK; "> }, { @@ -74754,11 +74764,15 @@ item_db: ( Name: "Leech End" Type: 0 Buy: 2 - Weight: 100 + Weight: 20 + Job: { + Assassin: true + } + Upper: 8 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_LEECHESEND,300000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_LEECHESEND, 300000, 0, 10, SCFLAG_FIXEDTICK; "> }, { @@ -74767,11 +74781,15 @@ item_db: ( Name: "Oblivion Curse" Type: 0 Buy: 2 - Weight: 100 + Weight: 20 + Job: { + Assassin: true + } + Upper: 8 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_OBLIVIONCURSE,300000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_OBLIVIONCURSE, 300000, 0, 10, SCFLAG_FIXEDTICK; "> }, { @@ -74780,11 +74798,15 @@ item_db: ( Name: "Disheart" Type: 0 Buy: 2 - Weight: 100 + Weight: 20 + Job: { + Assassin: true + } + Upper: 8 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_DEATHHURT,300000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_DEATHHURT, 300000, 0, 10, SCFLAG_FIXEDTICK; "> }, { @@ -74793,11 +74815,15 @@ item_db: ( Name: "Toxin" Type: 0 Buy: 2 - Weight: 100 + Weight: 20 + Job: { + Assassin: true + } + Upper: 8 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_TOXIN,300000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_TOXIN, 300000, 0, 10, SCFLAG_FIXEDTICK; "> }, { @@ -74806,11 +74832,15 @@ item_db: ( Name: "Pyrexia" Type: 0 Buy: 2 - Weight: 100 + Weight: 20 + Job: { + Assassin: true + } + Upper: 8 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_PYREXIA,300000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_PYREXIA, 300000, 0, 10, SCFLAG_FIXEDTICK; "> }, { @@ -74819,11 +74849,16 @@ item_db: ( Name: "Magic Mushroom" Type: 0 Buy: 2 - Weight: 100 + Weight: 20 + BuyingStore: true + Job: { + Assassin: true + } + Upper: 8 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_MAGICMUSHROOM,300000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_MAGICMUSHROOM, 300000, 0, 10, SCFLAG_FIXEDTICK; "> }, { @@ -74832,11 +74867,15 @@ item_db: ( Name: "Venom Bleed" Type: 0 Buy: 2 - Weight: 100 + Weight: 20 + Job: { + Assassin: true + } + Upper: 8 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_VENOMBLEED,15000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_VENOMBLEED, 15000, 0, 10, SCFLAG_FIXEDTICK; "> }, @@ -74848,6 +74887,9 @@ item_db: ( Type: 11 Buy: 100 Weight: 100 + Job: { + Knight: true + } Upper: 8 Delay: 120000 Trade: { @@ -74863,7 +74905,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_REFRESH,1; "> + Script: <" itemskill RK_REFRESH, 1; "> }, { Id: 12726 @@ -74872,6 +74914,9 @@ item_db: ( Type: 11 Buy: 100 Weight: 100 + Job: { + Knight: true + } Upper: 8 Delay: 30000 Trade: { @@ -74887,7 +74932,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_CRUSHSTRIKE,1; "> + Script: <" itemskill RK_CRUSHSTRIKE, 1; "> }, { Id: 12727 @@ -74896,6 +74941,9 @@ item_db: ( Type: 11 Buy: 100 Weight: 100 + Job: { + Knight: true + } Upper: 8 Delay: 60000 Trade: { @@ -74911,7 +74959,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_MILLENNIUMSHIELD,1; "> + Script: <" itemskill RK_MILLENNIUMSHIELD, 1; "> }, { Id: 12728 @@ -74920,6 +74968,9 @@ item_db: ( Type: 11 Buy: 100 Weight: 100 + Job: { + Knight: true + } Upper: 8 Trade: { nodrop: true @@ -74934,7 +74985,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_VITALITYACTIVATION,1; "> + Script: <" itemskill RK_VITALITYACTIVATION, 1; "> }, { Id: 12729 @@ -74943,6 +74994,9 @@ item_db: ( Type: 11 Buy: 100 Weight: 100 + Job: { + Knight: true + } Upper: 8 Trade: { nodrop: true @@ -74957,7 +75011,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_FIGHTINGSPIRIT,1; "> + Script: <" itemskill RK_FIGHTINGSPIRIT, 1; "> }, { Id: 12730 @@ -74966,6 +75020,9 @@ item_db: ( Type: 11 Buy: 100 Weight: 100 + Job: { + Knight: true + } Upper: 8 Trade: { nodrop: true @@ -74980,7 +75037,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_ABUNDANCE,1; "> + Script: <" itemskill RK_ABUNDANCE, 1; "> }, { Id: 12731 @@ -74989,6 +75046,9 @@ item_db: ( Type: 11 Buy: 100 Weight: 100 + Job: { + Knight: true + } Upper: 8 Trade: { nodrop: true @@ -75003,7 +75063,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_GIANTGROWTH,1; "> + Script: <" itemskill RK_GIANTGROWTH, 1; "> }, { Id: 12732 @@ -75012,6 +75072,9 @@ item_db: ( Type: 11 Buy: 100 Weight: 100 + Job: { + Knight: true + } Upper: 8 Delay: 1000 Trade: { @@ -75027,7 +75090,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_STORMBLAST,1; "> + Script: <" itemskill RK_STORMBLAST, 1; "> }, { Id: 12733 @@ -75036,6 +75099,9 @@ item_db: ( Type: 11 Buy: 100 Weight: 100 + Job: { + Knight: true + } Upper: 8 Trade: { nodrop: true @@ -75050,9 +75116,10 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_STONEHARDSKIN,1; "> + Script: <" itemskill RK_STONEHARDSKIN, 1; "> }, -// Rune Knight Rune Ores + +//== Rune Knight Rune Ores ============================= { Id: 12734 AegisName: "Runstone_Quality" @@ -75060,10 +75127,6 @@ item_db: ( Type: 0 Buy: 2 Weight: 100 - Job: { - Knight: true - } - Upper: 8 BuyingStore: true Script: <" makerune 5; "> }, @@ -75074,10 +75137,6 @@ item_db: ( Type: 0 Buy: 2 Weight: 100 - Job: { - Knight: true - } - Upper: 8 BuyingStore: true Script: <" makerune 11; "> }, @@ -75088,10 +75147,6 @@ item_db: ( Type: 0 Buy: 2 Weight: 100 - Job: { - Knight: true - } - Upper: 8 BuyingStore: true Script: <" makerune 14; "> }, @@ -75102,10 +75157,6 @@ item_db: ( Type: 0 Buy: 2 Weight: 100 - Job: { - Knight: true - } - Upper: 8 BuyingStore: true Script: <" makerune 2; "> }, @@ -75116,10 +75167,6 @@ item_db: ( Type: 0 Buy: 2 Weight: 100 - Job: { - Knight: true - } - Upper: 8 BuyingStore: true Script: <" makerune 8; "> }, @@ -96076,7 +96123,20 @@ item_db: ( Type: 11 Buy: 2 Weight: 100 + Job: { + Knight: true + } + Upper: 8 Delay: 60000 + Trade: { + nodrop: true + notrade: true + noselltonpc: true + nocart: true + nogstorage: true + nomail: true + noauction: true + } Stack: [20, 1] Script: <" itemskill RK_LUXANIMA,1; "> }, diff --git a/db/pre-re/skill_db.conf b/db/pre-re/skill_db.conf index 39ae0b313..80527b4f6 100644 --- a/db/pre-re/skill_db.conf +++ b/db/pre-re/skill_db.conf @@ -29842,6 +29842,7 @@ skill_db: ( } Requirements: { SPCost: 40 + State: "Cart" } }, { diff --git a/db/re/item_db.conf b/db/re/item_db.conf index ca826e58d..d1f416b08 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -1218,6 +1218,9 @@ item_db: ( Buy: 2000 Weight: 100 BuyingStore: true + Nouse: { + sitting: true + } Script: <" itemskill SM_ENDURE,1; "> }, { @@ -1228,6 +1231,9 @@ item_db: ( Buy: 1500 Weight: 100 BuyingStore: true + Nouse: { + sitting: true + } Script: <" itemskill SM_SELFPROVOKE,1; "> }, { @@ -94153,10 +94159,14 @@ item_db: ( Type: 0 Buy: 2 Weight: 20 + Job: { + Assassin: true + } + Upper: 56 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_PARALYSE,300000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_PARALYSE, 300000, 0, 10, SCFLAG_FIXEDTICK; "> }, { @@ -94166,10 +94176,14 @@ item_db: ( Type: 0 Buy: 2 Weight: 20 + Job: { + Assassin: true + } + Upper: 56 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_LEECHESEND,300000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_LEECHESEND, 300000, 0, 10, SCFLAG_FIXEDTICK; "> }, { @@ -94179,10 +94193,14 @@ item_db: ( Type: 0 Buy: 2 Weight: 20 + Job: { + Assassin: true + } + Upper: 56 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_OBLIVIONCURSE,300000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_OBLIVIONCURSE, 300000, 0, 10, SCFLAG_FIXEDTICK; "> }, { @@ -94192,10 +94210,14 @@ item_db: ( Type: 0 Buy: 2 Weight: 20 + Job: { + Assassin: true + } + Upper: 56 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_DEATHHURT,300000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_DEATHHURT, 300000, 0, 10, SCFLAG_FIXEDTICK; "> }, { @@ -94205,10 +94227,14 @@ item_db: ( Type: 0 Buy: 2 Weight: 20 + Job: { + Assassin: true + } + Upper: 56 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_TOXIN,300000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_TOXIN, 300000, 0, 10, SCFLAG_FIXEDTICK; "> }, { @@ -94218,10 +94244,14 @@ item_db: ( Type: 0 Buy: 2 Weight: 20 + Job: { + Assassin: true + } + Upper: 56 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_PYREXIA,300000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_PYREXIA, 300000, 0, 10, SCFLAG_FIXEDTICK; "> }, { @@ -94231,10 +94261,14 @@ item_db: ( Type: 0 Buy: 2 Weight: 20 + Job: { + Assassin: true + } + Upper: 56 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_MAGICMUSHROOM,300000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_MAGICMUSHROOM, 300000, 0, 10, SCFLAG_FIXEDTICK; "> }, { @@ -94244,10 +94278,14 @@ item_db: ( Type: 0 Buy: 2 Weight: 20 + Job: { + Assassin: true + } + Upper: 56 BuyingStore: true Script: <" specialeffect2 EF_ENCHANTPOISON; - sc_start SC_VENOMBLEED,15000,0,10,SCFLAG_FIXEDTICK; + sc_start SC_VENOMBLEED, 15000, 0, 10, SCFLAG_FIXEDTICK; "> }, @@ -94259,6 +94297,10 @@ item_db: ( Type: 11 Buy: 2 Weight: 100 + Job: { + Knight: true + } + Upper: 56 Delay: 120000 Trade: { nodrop: true @@ -94273,7 +94315,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_REFRESH,1; "> + Script: <" itemskill RK_REFRESH, 1; "> }, { Id: 12726 @@ -94282,6 +94324,10 @@ item_db: ( Type: 11 Buy: 2 Weight: 100 + Job: { + Knight: true + } + Upper: 56 Delay: 30000 Trade: { nodrop: true @@ -94296,7 +94342,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_CRUSHSTRIKE,1; "> + Script: <" itemskill RK_CRUSHSTRIKE, 1; "> }, { Id: 12727 @@ -94305,6 +94351,10 @@ item_db: ( Type: 11 Buy: 2 Weight: 100 + Job: { + Knight: true + } + Upper: 56 Delay: 60000 Trade: { nodrop: true @@ -94319,7 +94369,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_MILLENNIUMSHIELD,1; "> + Script: <" itemskill RK_MILLENNIUMSHIELD, 1; "> }, { Id: 12728 @@ -94328,6 +94378,10 @@ item_db: ( Type: 11 Buy: 2 Weight: 100 + Job: { + Knight: true + } + Upper: 56 Trade: { nodrop: true notrade: true @@ -94341,7 +94395,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_VITALITYACTIVATION,1; "> + Script: <" itemskill RK_VITALITYACTIVATION, 1; "> }, { Id: 12729 @@ -94350,6 +94404,10 @@ item_db: ( Type: 11 Buy: 2 Weight: 100 + Job: { + Knight: true + } + Upper: 56 Trade: { nodrop: true notrade: true @@ -94363,7 +94421,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_FIGHTINGSPIRIT,1; "> + Script: <" itemskill RK_FIGHTINGSPIRIT, 1; "> }, { Id: 12730 @@ -94372,6 +94430,10 @@ item_db: ( Type: 11 Buy: 2 Weight: 100 + Job: { + Knight: true + } + Upper: 56 Trade: { nodrop: true notrade: true @@ -94385,7 +94447,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_ABUNDANCE,1; "> + Script: <" itemskill RK_ABUNDANCE, 1; "> }, { Id: 12731 @@ -94394,6 +94456,10 @@ item_db: ( Type: 11 Buy: 2 Weight: 100 + Job: { + Knight: true + } + Upper: 56 Trade: { nodrop: true notrade: true @@ -94407,7 +94473,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_GIANTGROWTH,1; "> + Script: <" itemskill RK_GIANTGROWTH, 1; "> }, { Id: 12732 @@ -94416,6 +94482,10 @@ item_db: ( Type: 11 Buy: 2 Weight: 100 + Job: { + Knight: true + } + Upper: 56 Delay: 1000 Trade: { nodrop: true @@ -94430,7 +94500,7 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_STORMBLAST,1; "> + Script: <" itemskill RK_STORMBLAST, 1; "> }, { Id: 12733 @@ -94439,6 +94509,10 @@ item_db: ( Type: 11 Buy: 2 Weight: 100 + Job: { + Knight: true + } + Upper: 56 Trade: { nodrop: true notrade: true @@ -94452,8 +94526,10 @@ item_db: ( sitting: true } Stack: [20, 1] - Script: <" itemskill RK_STONEHARDSKIN,1; "> + Script: <" itemskill RK_STONEHARDSKIN, 1; "> }, + +//== Rune Knight Rune Ores ============================= { Id: 12734 AegisName: "Runstone_Quality" @@ -94461,9 +94537,6 @@ item_db: ( Type: 0 Buy: 2 Weight: 100 - Job: { - Knight: true - } BuyingStore: true Script: <" makerune 5; "> }, @@ -94474,9 +94547,6 @@ item_db: ( Type: 0 Buy: 2 Weight: 100 - Job: { - Knight: true - } BuyingStore: true Script: <" makerune 11; "> }, @@ -94487,9 +94557,6 @@ item_db: ( Type: 0 Buy: 2 Weight: 100 - Job: { - Knight: true - } BuyingStore: true Script: <" makerune 14; "> }, @@ -94500,9 +94567,6 @@ item_db: ( Type: 0 Buy: 2 Weight: 100 - Job: { - Knight: true - } BuyingStore: true Script: <" makerune 2; "> }, @@ -94513,9 +94577,6 @@ item_db: ( Type: 0 Buy: 2 Weight: 100 - Job: { - Knight: true - } BuyingStore: true Script: <" makerune 8; "> }, @@ -146815,6 +146876,10 @@ item_db: ( Type: 11 Buy: 2 Weight: 100 + Job: { + Knight: true + } + Upper: 56 Delay: 60000 Trade: { nodrop: true @@ -146826,7 +146891,7 @@ item_db: ( noauction: true } Stack: [20, 1] - Script: <" itemskill RK_LUXANIMA,1; "> + Script: <" itemskill RK_LUXANIMA, 1; "> }, { Id: 22669 diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index ffc5e4e52..2a59785fa 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -30657,6 +30657,7 @@ skill_db: ( } Requirements: { SPCost: 40 + State: "Cart" } }, { diff --git a/doc/constants.md b/doc/constants.md index c6665126c..22521a60c 100644 --- a/doc/constants.md +++ b/doc/constants.md @@ -3430,6 +3430,50 @@ - `4_F_REBELLION2`: 10201 - `4_F_REBELLION3`: 10202 - `4_M_ILYA`: 10203 +- `4_ELDER`: 10205 +- `4_LUNATIC`: 10206 +- `4_F_NOVICE2`: 10207 +- `4_WICKEDNYMPH`: 10208 +- `4_F_PREMI`: 10209 +- `4_M_COSTELL`: 10210 +- `4_M_YATTWARP`: 10211 +- `4_M_EVOKASCUDI`: 10212 +- `4_M_JOHNNYJAMES`: 10213 +- `4_M_ALBERTFORD`: 10214 +- `4_M_SEANMCCURDY`: 10215 +- `4_M_KARAMPUCCI`: 10216 +- `4_M_CACTUSMAN1`: 10217 +- `4_M_CACTUSMAN2`: 10218 +- `4_M_CACTUSMAN3`: 10219 +- `4_M_CACTUSLADY`: 10220 +- `4_M_GAST`: 10221 +- `4_M_CACTUSCHILD`: 10222 +- `4_KING`: 10223 +- `4_F_BOMI`: 10224 +- `4_M_CACTUSCHIEF`: 10225 +- `4_F_CACTUSCHILD2`: 10226 +- `4_F_CACTUSLADY2`: 10227 +- `4_F_CACTUSLADY3`: 10228 +- `4_M_CACTUS`: 10229 +- `4_M_COWRAIDERS1`: 10230 +- `4_M_COWRAIDERS2`: 10231 +- `4_M_COWRAIDERS3`: 10232 +- `4_F_JP14THEVT`: 10233 +- `4_M_POORSCHOLAR`: 10234 +- `4_M_PEPPERROTI`: 10235 +- `JP_NPC01`: 10236 +- `4_PURPLE_WARP`: 10237 +- `4_F_NARIN`: 10238 +- `4_M_URGENT_MAN`: 10239 +- `4_M_KEEN_SOLDIER`: 10240 +- `4_F_SLOPPY_WOMAN`: 10241 +- `4_F_DRKAFRA01`: 10242 +- `4_M_DRZONDA01`: 10243 +- `4_M_SWD_RENO`: 10244 +- `4_M_KNG_RENO`: 10245 +- `4_M_AC_RUMIN`: 10246 +- `4_M_HIGH_WIZARD`: 10247 +- `4_SYSTEM_BOX`: 10248 ### Mercenary IDs @@ -3613,7 +3657,7 @@ - `MOUNT_DRAGON_BLUE`: 7 - `MOUNT_DRAGON_RED`: 8 -### gettime +### Gettime Types - `GETTIME_SECOND`: 1 - `GETTIME_MINUTE`: 2 @@ -3640,6 +3684,14 @@ - `UNITTYPE_MER`: 5 - `UNITTYPE_ELEM`: 6 +### Unit AI Types + +- `AI_NONE`: 0 +- `AI_ATTACK`: 1 +- `AI_SPHERE`: 2 +- `AI_FLORA`: 3 +- `AI_ZANZOU`: 4 + ### Colors - `C_AQUA`: 65535 @@ -3669,6 +3721,64 @@ - `SEX_FEMALE`: 0 - `SEX_MALE`: 1 +### Script Unit Data Types + +- `UDT_TYPE`: 0 +- `UDT_SIZE`: 1 +- `UDT_LEVEL`: 2 +- `UDT_HP`: 3 +- `UDT_MAXHP`: 4 +- `UDT_SP`: 5 +- `UDT_MAXSP`: 6 +- `UDT_MASTERAID`: 7 +- `UDT_MASTERCID`: 8 +- `UDT_MAPIDXY`: 9 +- `UDT_WALKTOXY`: 10 +- `UDT_SPEED`: 11 +- `UDT_MODE`: 12 +- `UDT_AI`: 13 +- `UDT_SCOPTION`: 14 +- `UDT_SEX`: 15 +- `UDT_CLASS`: 16 +- `UDT_HAIRSTYLE`: 17 +- `UDT_HAIRCOLOR`: 18 +- `UDT_HEADBOTTOM`: 19 +- `UDT_HEADMIDDLE`: 20 +- `UDT_HEADTOP`: 21 +- `UDT_CLOTHCOLOR`: 22 +- `UDT_SHIELD`: 23 +- `UDT_WEAPON`: 24 +- `UDT_LOOKDIR`: 25 +- `UDT_CANMOVETICK`: 26 +- `UDT_STR`: 27 +- `UDT_AGI`: 28 +- `UDT_VIT`: 29 +- `UDT_INT`: 30 +- `UDT_DEX`: 31 +- `UDT_LUK`: 32 +- `UDT_ATKRANGE`: 33 +- `UDT_ATKMIN`: 34 +- `UDT_ATKMAX`: 35 +- `UDT_MATKMIN`: 36 +- `UDT_MATKMAX`: 37 +- `UDT_DEF`: 38 +- `UDT_MDEF`: 39 +- `UDT_HIT`: 40 +- `UDT_FLEE`: 41 +- `UDT_PDODGE`: 42 +- `UDT_CRIT`: 43 +- `UDT_RACE`: 44 +- `UDT_ELETYPE`: 45 +- `UDT_ELELEVEL`: 46 +- `UDT_AMOTION`: 47 +- `UDT_ADELAY`: 48 +- `UDT_DMOTION`: 49 +- `UDT_HUNGER`: 50 +- `UDT_INTIMACY`: 51 +- `UDT_LIFETIME`: 52 +- `UDT_MERC_KILLCOUNT`: 53 +- `UDT_STATADD`: 54 + ## Hardcoded Constants (source) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index a8fc2e114..d7795b7a6 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -9479,3 +9479,149 @@ to be used within a "OnPayFunds" event of a NST_CUSTOM trader. Returns the amount of still-available <Item_ID> in the shop (on a NST_MARKET trader). --------------------------------------- + +*setunitdata(<GUID>, <DataType>, <Val1> {,<Val2>,<Val3>}) + +Sets or alters the data in real-time for game objects of the following types - +NPCs, Pets, Monsters, Homunuculus', Mercenaries, Elementals. + +Applicable Data Types (available as constants) - + Data Types Description (parameter type) + UDT_SIZE: Unit Size (int) + UDT_LEVEL: Level (int) + UDT_HP: Current HP (int) + UDT_MAXHP: Max HP (int) + UDT_SP: SP (int) + UDT_MAXSP: MAX SP (int) + UDT_MASTERAID: Master Account ID (for Summons) (int) + UDT_MASTERCID: Master Char ID (for Summons) (int) + UDT_MAPIDXY: Warp a Unit to a map. (Val1 = (string) MapName, Val2 = (int) x, Val3 = (int) y) + UDT_WALKTOXY: Make a unit walk to certain co-ordinates. (Val1 = (int) x, Val2 = (int) y) + UDT_SPEED: Unit Speed. (int) + UDT_MODE: Mode (Mobs only) (int) + UDT_AI: Unit AI Type (see constants.conf for Unit AI Types) + UDT_SCOPTION: Status Options. (see constants.conf for Unit Option Types) + UDT_SEX: Gender of the unit. (see constants.conf for Genders) + UDT_CLASS: Class of the unit. (Monster ID) (int) + UDT_HAIRSTYLE: Hair Style ID. (int) + UDT_HAIRCOLOR: Hair Color ID. (int) + UDT_HEADBOTTOM: Headgear Bottom Sprite ID. (int) + UDT_HEADMIDDLE: Headgear Middle Sprite ID. (int) + UDT_HEADTOP: Headgear Top Sprite ID. (int) + UDT_CLOTHCOLOR: Cloth Color ID. (int) + UDT_SHIELD: Shield Sprite ID. (int) + UDT_WEAPON: Weapon Sprite ID. (int) + UDT_LOOKDIR: Face direction. (int) + UDT_CANMOVETICK: Stop a unit from move for n seconds. (int) + UDT_STR: Unit STR. (int) + UDT_AGI: Unit AGI. (int) + UDT_VIT: Unit VIT. (int) + UDT_INT: Unit INT. (int) + UDT_DEX: Unit DEX. (int) + UDT_LUK: Unit LUK. (int) + UDT_ATKRANGE: Attack range of a unit. (int) + UDT_ATKMIN: Min Atk of a unit. (int) + UDT_ATKMAX: Max Atk of a unit. (int) + UDT_MATKMIN: Min MATK of a unit. (int) + UDT_MATKMAX: Max MATK of a unit. (int) + UDT_DEF: DEF. (int) + UDT_MDEF: MDEF. (int) + UDT_HIT: HIT. (int) + UDT_FLEE: FLEE. (int) + UDT_PDODGE: Perfect Dodge. (int) + UDT_CRIT: Critical Rate. (int) + UDT_RACE: Race. (Eg. string constants RC_DemiHuman or Integer 7). + UDT_ELETYPE: Element. (Eg. string constants Ele_Neutral or Integer 0). + UDT_ELELEVEL: Element Level (int). + UDT_AMOTION: AMotion Rate (int). + UDT_ADELAY: ADelay Rate (int). + UDT_DMOTION: DMotion Rate (int). + UDT_HUNGER: Hunger Rate (int) - for summons. + UDT_INTIMACY: Intimacy Rate (int) - for summons. + UDT_LIFETIME: LifeTime (int) - for summons. + UDT_MERC_KILLCOUNT: Kill count for mercenaries (int). + UDT_STATADD: Status Points (int) - for NPCs. + +returns 0 if value could not be set, 1 if successful. + +--------------------------------------- + +*getunitdata (<GUID>,<DataType>{,<Variable>}) + +Retrieves real-time data of a game object. For data with multiple return values, +an array variable may be passed to store the data in. + +Applicable Data types (available as constants) - + Data Types Description (return type) + UDT_SIZE: Unit Size (int) + UDT_LEVEL: Level (int) + UDT_HP: Current HP (int) + UDT_MAXHP: Max HP (int) + UDT_SP: SP (int) + UDT_MAXSP: MAX SP (int) + UDT_MASTERAID: Master Account ID (for Summons) (int) + UDT_MASTERCID: Master Char ID (for Summons) (int) + UDT_MAPIDXY: Warp a Unit to a map. (Val1 = (string) MapName, Val2 = (int) x, Val3 = (int) y) + UDT_SPEED: Unit Speed. (int) + UDT_MODE: Mode (Mobs only) (int) + UDT_AI: Unit AI Type (see constants.conf for Unit AI Types) + UDT_SCOPTION: Status Options. (see constants.conf for Unit Option Types) + UDT_SEX: Gender of the unit. (see constants.conf for Genders) + UDT_CLASS: Class of the unit. (Monster ID) (int) + UDT_HAIRSTYLE: Hair Style ID. (int) + UDT_HAIRCOLOR: Hair Color ID. (int) + UDT_HEADBOTTOM: Headgear Bottom Sprite ID. (int) + UDT_HEADMIDDLE: Headgear Middle Sprite ID. (int) + UDT_HEADTOP: Headgear Top Sprite ID. (int) + UDT_CLOTHCOLOR: Cloth Color ID. (int) + UDT_SHIELD: Shield Sprite ID. (int) + UDT_WEAPON: Weapon Sprite ID. (int) + UDT_LOOKDIR: Face direction. (int) + UDT_CANMOVETICK: Stop a unit from move for n seconds. (int) + UDT_STR: Unit STR. (int) + UDT_AGI: Unit AGI. (int) + UDT_VIT: Unit VIT. (int) + UDT_INT: Unit INT. (int) + UDT_DEX: Unit DEX. (int) + UDT_LUK: Unit LUK. (int) + UDT_ATKRANGE: Attack range of a unit. (int) + UDT_ATKMIN: Min Atk of a unit. (int) + UDT_ATKMAX: Max Atk of a unit. (int) + UDT_MATKMIN: Min MATK of a unit. (int) + UDT_MATKMAX: Max MATK of a unit. (int) + UDT_DEF: DEF. (int) + UDT_MDEF: MDEF. (int) + UDT_HIT: HIT. (int) + UDT_FLEE: FLEE. (int) + UDT_PDODGE: Perfect Dodge. (int) + UDT_CRIT: Critical Rate. (int) + UDT_RACE: Race. (Eg. string constants RC_DemiHuman or Integer 7). + UDT_ELETYPE: Element. (Eg. string constants Ele_Neutral or Integer 0). + UDT_ELELEVEL: Element Level (int). + UDT_AMOTION: AMotion Rate (int). + UDT_ADELAY: ADelay Rate (int). + UDT_DMOTION: DMotion Rate (int). + UDT_HUNGER: Hunger Rate (int) - for summons. + UDT_INTIMACY: Intimacy Rate (int) - for summons. + UDT_LIFETIME: LifeTime (int) - for summons. + UDT_MERC_KILLCOUNT: Kill count for mercenaries (int). + +returns 0 if value could not be retrieved. + +--------------------------------------- + +*getunitname(<GID>) + +Retrieve the name of a unit. + +returns "Unknown" if the value could not be retrieved. + +--------------------------------------- + +*setunitname(<GID>, <Name>) + +Changes the name of a unit. + +Supported Types - [ MOB | HOM | PET ]. + +returns 1 on success, 0 on failure. diff --git a/npc/cities/aldebaran.txt b/npc/cities/aldebaran.txt index f2820b3b0..57d4205df 100644 --- a/npc/cities/aldebaran.txt +++ b/npc/cities/aldebaran.txt @@ -1209,13 +1209,8 @@ function script F_Lottery { mes "[Kafra]"; mes "^FF0000Lets see.... This is...!!^000000"; next; - if(@temp < 1) goto sL_Prize1; - if(@temp < 2) goto sL_Prize2; - if(@temp < 3) goto sL_Prize3; - if(@temp <= 4) goto sL_Prize4; - goto sL_Prize5; - - sL_Prize1: + switch (@temp) { + case 0: mes "[Kafra]"; mes "WOW!!!!..... You win!!! 1st Prize~! Congratulations~~ You got the 1st prize~~"; if(@Lotto == 1) getitem Wooden_Mail,1;//Items: Wooden_Mail, @@ -1227,7 +1222,7 @@ function script F_Lottery { } if(@Lotto == 5) getitem Yggdrasilberry,3;//Items: Yggdrasilberry, return; - sL_Prize2: + case 1: mes "[Kafra]"; mes "Oh! WOW! You've won the 2nd prize! Congratulations!!"; if(@Lotto == 1) getitem Shoes,1;//Items: Shoes, @@ -1239,7 +1234,7 @@ function script F_Lottery { getitem Royal_Jelly,10;//Items: Royal_Jelly, } return; - sL_Prize3: + case 2: mes "[Kafra]"; mes "Congratulations! You've won the 3rd prize."; if(@Lotto == 1) getitem Wing_Of_Butterfly,4;//Items: Butterfly_Wing, @@ -1248,7 +1243,8 @@ function script F_Lottery { if(@Lotto == 4) getitem White_Potion,15;//Items: White_Potion, if(@Lotto == 5) getitem White_Potion,30;//Items: White_Potion, return; - sL_Prize4: + case 3: + case 4: mes "[Kafra]"; mes "You've won the 4th prize."; if(@Lotto == 1) getitem Sweet_Potato,100;//Items: Sweet_Potato, @@ -1257,7 +1253,7 @@ function script F_Lottery { if(@Lotto == 4) getitem Blue_Potion,5;//Items: Blue_Potion, if(@Lotto == 5) getitem Blue_Potion,10;//Items: Blue_Potion, return; - sL_Prize5: + default: mes "[Kafra]"; mes "You've won the 5th prize."; if(@Lotto == 1) getitem Sweet_Potato,50;//Items: Sweet_Potato, @@ -1266,18 +1262,20 @@ function script F_Lottery { if(@Lotto == 4) getitem Red_Potion,250;//Items: Red_Potion, if(@Lotto == 5) getitem Red_Potion,300;//Items: Red_Potion, return; + } sF_Spin: - mes "[Lottery Machine]"; - mes "Number of spins remaining: "+@input; - next; - mes "[Lottery Machine]"; - mes "(rumble~rumble~rumble~)..."; - next; - @temp = rand(10); - --@input; - if(@input <= 0) return; - goto sF_Spin; + while (true) { + mes "[Lottery Machine]"; + mes "Number of spins remaining: "+@input; + next; + mes "[Lottery Machine]"; + mes "(rumble~rumble~rumble~)..."; + next; + @temp = rand(10); + --@input; + if(@input <= 0) return; + } } //== Inside Clock Tower ==================================== diff --git a/npc/events/MemorialDay_2008.txt b/npc/events/MemorialDay_2008.txt index 41ff5b610..b87bba5f2 100644 --- a/npc/events/MemorialDay_2008.txt +++ b/npc/events/MemorialDay_2008.txt @@ -211,12 +211,7 @@ prontera,153,286,4 script Memorial Plaque#Memorial 4_BOARD3,{ next; Memorial08 = 9; getexp 93750,43750; - goto L_CleanPlaque; - } else if (Memorial08 >= 9) { - goto L_CleanPlaque; } - -L_CleanPlaque: mes "- You see a message from the cleaned plaque.-"; next; mes "-Although no sculptured marble should rise to their memory,-"; @@ -285,9 +280,9 @@ prontera,150,270,4 script Grast#Memorial 4_M_HUMERCHANT,{ mes "I can provide you all the materials."; next; if (select("I'll gather the rest.", "Give me the materials.") == 2) { - goto L_GiveUp; + callsub L_GiveUp; } - goto L_Continue; + callsub L_Continue; } else { mes "[Grast]"; mes "Oh, you've brought the materials I asked."; @@ -313,9 +308,9 @@ prontera,150,270,4 script Grast#Memorial 4_M_HUMERCHANT,{ mes "If you feel too burdened to gather them all, I can provide you all the materials."; next; if (select("I'll gather the rest.", "Give me the materials.") == 2) { - goto L_GiveUp; + callsub L_GiveUp; } - goto L_Continue; + callsub L_Continue; } else { mes "[Grast]"; mes "Oh, you've brought everything I asked."; @@ -342,9 +337,9 @@ prontera,150,270,4 script Grast#Memorial 4_M_HUMERCHANT,{ mes "It's your call, " + strcharinfo(PC_NAME) + "."; next; if (select("I'll gather the rest.", "Give me the materials.") == 2) { - goto L_GiveUp; + callsub L_GiveUp; } - goto L_Continue; + callsub L_Continue; } else { mes "[Grast]"; mes "Have you brought the materials I asked?"; diff --git a/npc/events/easter_2010.txt b/npc/events/easter_2010.txt index 645e0cacf..0ccd987cf 100644 --- a/npc/events/easter_2010.txt +++ b/npc/events/easter_2010.txt @@ -119,31 +119,7 @@ prontera,202,297,3 script Rina#Easter 4_F_JOB_HUNTER,{ setquest 9117; close; } else if (.@quest1 == 1) { - L_HuntingInfo: - mes "[Rina]"; - mes "What you need to do is"; - mes "to choose one monster among"; - mes "^FF0000DEVIRUCHI,^000000 ^FF0000WRAITH DEAD,^000000"; - mes "^FF0000DULLAHAN,^000000 ^FF0000NIGHTMARE TERROR^000000"; - mes "and then kill ^0000FF50^000000 monsters"; - mes "and come back to me."; - next; - mes "[Rina]"; - mes "It must be a tough task,"; - mes "but you are the right person"; - mes "who did the oath-taking ceremony."; - mes "I hope you succeed."; - if (.@quest1 < 2) { - completequest 9117; - setquest 9118; - setquest 9119; - setquest 9120; - setquest 9121; - } - close2; - npcskill "AL_INCAGI",1,0,0; - npcskill "AL_BLESSING",1,0,0; - end; + callsub(L_HuntingInfo, .@quest1); } else if (.@quest1 == 2) { if (questprogress(9118) != 2 || questprogress(9119) != 2 || questprogress(9120) != 2 || questprogress(9121) != 2) { if (questprogress(9118,HUNTING) == 2 || questprogress(9119,HUNTING) == 2 || questprogress(9120,HUNTING) == 2 || questprogress(9121,HUNTING) == 2) { @@ -162,7 +138,7 @@ prontera,202,297,3 script Rina#Easter 4_F_JOB_HUNTER,{ completequest 9121; setquest 9122; } else - goto L_HuntingInfo; + callsub(L_HuntingInfo, .@quest1); end; } } @@ -309,6 +285,32 @@ prontera,202,297,3 script Rina#Easter 4_F_JOB_HUNTER,{ npcskill "AL_INCAGI",1,0,0; npcskill "AL_BLESSING",1,0,0; end; + +L_HuntingInfo: + mes "[Rina]"; + mes "What you need to do is"; + mes "to choose one monster among"; + mes "^FF0000DEVIRUCHI,^000000 ^FF0000WRAITH DEAD,^000000"; + mes "^FF0000DULLAHAN,^000000 ^FF0000NIGHTMARE TERROR^000000"; + mes "and then kill ^0000FF50^000000 monsters"; + mes "and come back to me."; + next; + mes "[Rina]"; + mes "It must be a tough task,"; + mes "but you are the right person"; + mes "who did the oath-taking ceremony."; + mes "I hope you succeed."; + if (getarg(0) < 2) { + completequest 9117; + setquest 9118; + setquest 9119; + setquest 9120; + setquest 9121; + } + close2; + npcskill "AL_INCAGI",1,0,0; + npcskill "AL_BLESSING",1,0,0; + end; } geffen,207,114,4 script #Hiddne01Easter CLEAR_NPC,{ diff --git a/npc/events/nguild/nguild_ev_agit.txt b/npc/events/nguild/nguild_ev_agit.txt index 99545bfff..9bb76f728 100644 --- a/npc/events/nguild/nguild_ev_agit.txt +++ b/npc/events/nguild/nguild_ev_agit.txt @@ -125,7 +125,7 @@ OnAgitStart: end; OnAgitBreak: callfunc "F_AgitBreak","nguild_alde","N01"; - goto OnAgitEliminate; + callsub OnAgitEliminate; end; OnGuildBreak: callfunc "F_GuildBreak","nguild_alde","N01"; @@ -152,7 +152,7 @@ OnAgitStart: end; OnAgitBreak: callfunc "F_AgitBreak","nguild_gef","N02"; - goto OnAgitEliminate; + callsub OnAgitEliminate; end; OnGuildBreak: callfunc "F_GuildBreak","nguild_gef","N02"; @@ -179,7 +179,7 @@ OnAgitStart: end; OnAgitBreak: callfunc "F_AgitBreak","nguild_pay","N03"; - goto OnAgitEliminate; + callsub OnAgitEliminate; end; OnGuildBreak: callfunc "F_GuildBreak","nguild_pay","N03"; @@ -206,7 +206,7 @@ OnAgitStart: end; OnAgitBreak: callfunc "F_AgitBreak","nguild_prt","N04"; - goto OnAgitEliminate; + callsub OnAgitEliminate; end; OnGuildBreak: callfunc "F_GuildBreak","nguild_prt","N04"; diff --git a/npc/events/nguild/nguild_kafras.txt b/npc/events/nguild/nguild_kafras.txt index 8b448bbe3..96371ec91 100644 --- a/npc/events/nguild/nguild_kafras.txt +++ b/npc/events/nguild/nguild_kafras.txt @@ -39,13 +39,12 @@ function script F_GKafra { cutin "kafra_01",2; @GID = getcastledata(getarg(0),1); - if (getcharid(CHAR_ID_GUILD) == @GID && getgdskilllv(@GID,10001)) goto L_StartG; - - mes "[Kafra Service]"; - mes "I am contracted to provide service only for the ^ff0000" + getguildname(@GID) + "^000000 Guild. Please use another Kafra Corporation staff member around here. I am Sorry for your inconvenience."; - cutin "",255; - close; -L_StartG: + if (getcharid(CHAR_ID_GUILD) != @GID || getgdskilllv(@GID,10001) < 1) { + mes "[Kafra Service]"; + mes "I am contracted to provide service only for the ^ff0000" + getguildname(@GID) + "^000000 Guild. Please use another Kafra Corporation staff member around here. I am Sorry for your inconvenience."; + cutin "",255; + close; + } @wrpP[0] = 200; @wrpD$[0] = getarg(1); setarray @wrpC$[0], @wrpD$[0]+" ^880000"+@wrpP[0]+"^000000 z", "Cancel", "", "", "",""; diff --git a/npc/events/nguild/nguild_managers.txt b/npc/events/nguild/nguild_managers.txt index 1d9b56966..a24a0cb15 100644 --- a/npc/events/nguild/nguild_managers.txt +++ b/npc/events/nguild/nguild_managers.txt @@ -63,7 +63,34 @@ function script F_GldManager { switch (select("Kafra Staff Employment / Dismissal","Enter Treasure Room","Cancel")) { case 1: // Employment / Dismissal mes "[ "+getarg(0)+" ]"; - if (getcastledata(getarg(1),9) == 1) goto L_Dismiss; + if (getcastledata(getarg(1),9) == 1) { + mes "Would you like to dismiss the current Kafra?"; + next; + if (select("Dismissal","Cancel") != 1) { + mes "[ "+getarg(0)+" ]"; + mes "Master, I think you should keep the current Kafra Staff because she is already trying her best to serve us"; + return; + } + cutin "kafra_01",2; + mes "[ Kafra Staff ]"; + mes "Have I done anything wrong? If I did, will you please forgive me?"; + next; + if (select("Dismiss","Cancel") != 1) { + mes "[ Kafra Staff ]"; + mes "Thank you master, I'll do my best! ^^."; + cutin "kafra_01",255; + return; + } + mes "[ Kafra Staff ]"; + mes "It's unfortunate that I won't be able to serve your guild anymore...."; + next; + disablenpc "Kafra Staff#"+getarg(4); + setcastledata getarg(1),9,0; + cutin "kafra_01",255; + mes "[ "+getarg(0)+" ]"; + mes "The Kafra has been dismissed. But... we should really get a Kafra as soon as possible!"; + return; + } if (getgdskilllv(@GID,10001) == 0){ mes "Master, you don't have a contract with the Kafra Staff Company."; mes "In order to hire a Kafra, you must first learn the Guild skill ^5533FFContract With Kafra^000000."; @@ -97,33 +124,6 @@ function script F_GldManager { //mes "Your employment contract lasts ^5533FF1 month^000000. After this term is over you will have to create a new contract."; mes "I think the Kafra Staff will benefit our guild members."; return; - L_Dismiss: - mes "Would you like to dismiss the current Kafra?"; - next; - if (select("Dismissal","Cancel") != 1) { - mes "[ "+getarg(0)+" ]"; - mes "Master, I think you should keep the current Kafra Staff because she is already trying her best to serve us"; - return; - } - cutin "kafra_01",2; - mes "[ Kafra Staff ]"; - mes "Have I done anything wrong? If I did, will you please forgive me?"; - next; - if (select("Dismiss","Cancel") != 1) { - mes "[ Kafra Staff ]"; - mes "Thank you master, I'll do my best! ^^."; - cutin "kafra_01",255; - return; - } - mes "[ Kafra Staff ]"; - mes "It's unfortunate that I won't be able to serve your guild anymore...."; - next; - disablenpc "Kafra Staff#"+getarg(4); - setcastledata getarg(1),9,0; - cutin "kafra_01",255; - mes "[ "+getarg(0)+" ]"; - mes "The Kafra has been dismissed. But... we should really get a Kafra as soon as possible!"; - return; case 2: // Enter Treasure Room mes "[ "+getarg(0)+" ]"; mes "Would you to go to our Treasure Room? Only you, the Guild Master, are allowed to enter this room."; diff --git a/npc/events/xmas.txt b/npc/events/xmas.txt index a6308b867..7419bc4bc 100644 --- a/npc/events/xmas.txt +++ b/npc/events/xmas.txt @@ -44,15 +44,14 @@ xmas_in,100,96,4 script Santa Claus::Santa2 4_M_SANTA,{ mes "[Santa Claus]"; if(xmas_npc==0) xmas_npc = 1; // For Lutie & Bard quest - if(#event_xmas > 0 && #event_xmas < 30 ) goto L_Start; - mes "Merry Christmas!"; - if(Class==0 || #event_xmas>=30 ) close; //anti exploit protection - mes "I have a gift for you! Ho Ho Ho!"; - getitem rand(664,667),1; //gives one of 4 gift boxes - ++#event_xmas; - close; - -L_Start: + if(#event_xmas <= 0 || #event_xmas >= 30 ) { + mes "Merry Christmas!"; + if(Class==0 || #event_xmas>=30 ) close; //anti exploit protection + mes "I have a gift for you! Ho Ho Ho!"; + getitem rand(664,667),1; //gives one of 4 gift boxes + ++#event_xmas; + close; + } mes "I'm having a bit of a problem..."; mes "Do you care to listen?"; next; @@ -98,7 +97,12 @@ L_Start: close; case 2: // Give proof mes "[Santa Claus]"; - if(countitem(Red_Socks_With_Holes) < 3) goto L_NotEnuf; + if(countitem(Red_Socks_With_Holes) < 3) { + mes "You don't have enough socks as proof."; + mes "Go take down those evil Santas"; + mes "and get more for me and I'll reward you."; + close; + } delitem 7034,3; mes "Seems you've been doing a"; mes "good job of taking down those"; @@ -111,12 +115,6 @@ L_Start: mes "If you get 3 more, I'll give you another."; mes "Hope you get a good item."; close; - - L_NotEnuf: - mes "You don't have enough socks as proof."; - mes "Go take down those evil Santas"; - mes "and get more for me and I'll reward you."; - close; default: // Cancel mes "[Santa Claus]"; mes "I see. Well, at the very least"; diff --git a/npc/instances/NydhoggsNest.txt b/npc/instances/NydhoggsNest.txt index 2c583d441..2a64e13be 100644 --- a/npc/instances/NydhoggsNest.txt +++ b/npc/instances/NydhoggsNest.txt @@ -150,7 +150,7 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper HIDDEN_NPC,8,8,{ mes "If you are ready, I will allow you to enter."; close; case 2: - goto L_Enter; + callsub L_Enter; case 3: close; } @@ -160,7 +160,7 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper HIDDEN_NPC,8,8,{ next; if(select("I want to go in.", "I want to leave.") == 2) close; - goto L_Enter; + callsub L_Enter; } else { .@instance = has_instance2("1@nyd"); if (.@instance >= 0) { @@ -180,7 +180,7 @@ nyd_dun02,100,201,3 script Yggdrasil Gatekeeper HIDDEN_NPC,8,8,{ next; if(select("I want to go in.", "I want to leave.") == 2) close; - goto L_Enter; + callsub L_Enter; } else if (.@ins_nyd_check == 2) { if (.@ins_nyd_check2 == 1) { mes "[Yggdrasil Gatekeeper]"; diff --git a/npc/jobs/2-2/sage.txt b/npc/jobs/2-2/sage.txt index cb5492046..49245e1ed 100644 --- a/npc/jobs/2-2/sage.txt +++ b/npc/jobs/2-2/sage.txt @@ -705,22 +705,36 @@ yuno_in03,105,177,5 script Written Test Professor#s 4_M_SAGE_A,{ mes "Come again when you finish the application."; close; } - else if (SAGE_Q == 4) { - mes "Welcome to the Schweicherbil Magic Academy."; - mes "You applied for this test already, didn't you?"; - next; - mes "[Claytos Verdo]"; - mes "Let's see, your name is " + strcharinfo(PC_NAME) + "..."; - mes "Okay, let's get started!"; - next; - mes "[Claytos Verdo]"; - mes "The test that I am going to give you will test your knowledge on all of the academic subjects in the world."; - mes "I will give you 20 questions, with each question being worth 5 points. When you earn a grade of 80 points, you will pass the test."; - next; - mes "[Claytos Verdo]"; - mes "Okay, there's no need to wait. Let's start right away"; - mes "Oh, and if you don't answer immediately, the test will be cancelled."; -L_AskQuestions: + else if (SAGE_Q == 4 || SAGE_Q == 5) { + if (SAGE_Q == 4) { + mes "Welcome to the Schweicherbil Magic Academy."; + mes "You applied for this test already, didn't you?"; + next; + mes "[Claytos Verdo]"; + mes "Let's see, your name is " + strcharinfo(PC_NAME) + "..."; + mes "Okay, let's get started!"; + next; + mes "[Claytos Verdo]"; + mes "The test that I am going to give you will test your knowledge on all of the academic subjects in the world."; + mes "I will give you 20 questions, with each question being worth 5 points. When you earn a grade of 80 points, you will pass the test."; + next; + mes "[Claytos Verdo]"; + mes "Okay, there's no need to wait. Let's start right away"; + mes "Oh, and if you don't answer immediately, the test will be cancelled."; + } else if (SAGE_Q == 5) { + mes "Welcome back."; + mes "So, did you study harder this time?"; + next; + mes "[Claytos Verdo]"; + mes "You will take the written test under the same conditions as the test you took before. I'll give you 20 questions."; + mes "Each correct answer will give you 5 points. When your score reaches 80 points, you pass the test."; + next; + sage_m2 = rand(1,3); + mes "[Claytos Verdo]"; + mes "Okay, there's no need to wait."; + mes "Answer immediately, or I'll fail you again."; + SAGE_Q = 5; + } next; switch(rand(1,3)) { case 1: @@ -1025,22 +1039,6 @@ L_AskQuestions: } close; } - else if (SAGE_Q == 5) { - mes "Welcome back."; - mes "So, did you study harder this time?"; - next; - mes "[Claytos Verdo]"; - mes "You will take the written test under the same conditions as the test you took before. I'll give you 20 questions."; - mes "Each correct answer will give you 5 points. When your score reaches 80 points, you pass the test."; - next; - sage_m2 = rand(1,3); - mes "[Claytos Verdo]"; - mes "Okay, there's no need to wait."; - mes "Answer immediately, or I'll fail you again."; - SAGE_Q = 5; - goto L_AskQuestions; - end; - } else if (SAGE_Q == 6) { mes "What else do you want?! Do you want to take this test again?"; mes "You've already passed!"; diff --git a/npc/merchants/clothes_dyer.txt b/npc/merchants/clothes_dyer.txt index 431a51cab..4204f600f 100644 --- a/npc/merchants/clothes_dyer.txt +++ b/npc/merchants/clothes_dyer.txt @@ -141,7 +141,7 @@ function Dyes; mes " - White: White Dyestuffs"; break; case 4: - goto L_End; + callsub L_End; } } @@ -158,7 +158,7 @@ function Dyes { .@menu$ += "- "+.@DyeName$[getarg(.@i)]+":"; .@menu$ += "- ^777777Cancel^000000"; .@s = select(.@menu$)-1; - if (.@s == (getargcount()/2)+1) goto L_End; + if (.@s == (getargcount()/2)+1) callsub L_End; mes .n$; if (.@s == 0) { mes "I can change your dye to"; @@ -172,7 +172,7 @@ function Dyes { mes "Your clothes have been dyed "+.@DyeName$[0]+"."; close; case 2: - goto L_End; + callsub L_End; } } if (!countitem(.@DyeItems[getarg((.@s-1)*2)])) { diff --git a/npc/other/hugel_bingo.txt b/npc/other/hugel_bingo.txt index 965405807..9c7b87ee4 100644 --- a/npc/other/hugel_bingo.txt +++ b/npc/other/hugel_bingo.txt @@ -96,26 +96,25 @@ OnTouch: @bingo_e4$ = 0; @bingo_e5$ = 0; @bingo_case = 1; -L_Fill: - @bingo_fill = callfunc("Func_Bingo",@bingo_case); - if (!@bingo_fill) { - mes "The numbers you have entered"; - mes "exceed the limit, or you have"; - mes "already entered these numbers."; - mes "Please enter your numbers again."; - next; - } else if (@bingo_fill) { - if(@bingoplate[25] < 10) @bingo_e5$ = "0"+@bingoplate[25]+""; else @bingo_e5$ = @bingoplate[25]; - donpcevent "start#bingo::OnEnter"; - mes "["+@bingo_a1$+"] ["+@bingo_a2$+"] ["+@bingo_a3$+"] ["+@bingo_a4$+"] ["+@bingo_a5$+"]"; - mes "["+@bingo_b1$+"] ["+@bingo_b2$+"] ["+@bingo_b3$+"] ["+@bingo_b4$+"] ["+@bingo_b5$+"]"; - mes "["+@bingo_c1$+"] ["+@bingo_c2$+"] ["+@bingo_c3$+"] ["+@bingo_c4$+"] ["+@bingo_c5$+"]"; - mes "["+@bingo_d1$+"] ["+@bingo_d2$+"] ["+@bingo_d3$+"] ["+@bingo_d4$+"] ["+@bingo_d5$+"]"; - mes "["+@bingo_e1$+"] ["+@bingo_e2$+"] ["+@bingo_e3$+"] ["+@bingo_e4$+"] ["+@bingo_e5$+"]"; - close; - + while (true) { + @bingo_fill = callfunc("Func_Bingo",@bingo_case); + if (!@bingo_fill) { + mes "The numbers you have entered"; + mes "exceed the limit, or you have"; + mes "already entered these numbers."; + mes "Please enter your numbers again."; + next; + } else if (@bingo_fill) { + if(@bingoplate[25] < 10) @bingo_e5$ = "0"+@bingoplate[25]+""; else @bingo_e5$ = @bingoplate[25]; + donpcevent "start#bingo::OnEnter"; + mes "["+@bingo_a1$+"] ["+@bingo_a2$+"] ["+@bingo_a3$+"] ["+@bingo_a4$+"] ["+@bingo_a5$+"]"; + mes "["+@bingo_b1$+"] ["+@bingo_b2$+"] ["+@bingo_b3$+"] ["+@bingo_b4$+"] ["+@bingo_b5$+"]"; + mes "["+@bingo_c1$+"] ["+@bingo_c2$+"] ["+@bingo_c3$+"] ["+@bingo_c4$+"] ["+@bingo_c5$+"]"; + mes "["+@bingo_d1$+"] ["+@bingo_d2$+"] ["+@bingo_d3$+"] ["+@bingo_d4$+"] ["+@bingo_d5$+"]"; + mes "["+@bingo_e1$+"] ["+@bingo_e2$+"] ["+@bingo_e3$+"] ["+@bingo_e4$+"] ["+@bingo_e5$+"]"; + close; + } } - goto L_Fill; } que_bingo,53,121,0 duplicate(plate1#bingo) plate2#bingo HIDDEN_WARP_NPC,1,1 diff --git a/npc/other/marriage.txt b/npc/other/marriage.txt index bbd659420..0f640af2a 100644 --- a/npc/other/marriage.txt +++ b/npc/other/marriage.txt @@ -58,7 +58,7 @@ prt_church,97,100,4 script Wedding Staff#w 1_F_LIBRARYGIRL,{ mes "married. For now, why"; mes "don't you enjoy the simple"; mes "pleasures of childhood?"; - goto L_End; + callsub L_End; } mes "[Marry Happy]"; mes "Oh, of course you"; @@ -67,7 +67,7 @@ prt_church,97,100,4 script Wedding Staff#w 1_F_LIBRARYGIRL,{ mes "are too many laws against"; mes "that~ Aren't you the most"; mes "adorable little thing?"; - goto L_End; + callsub L_End; } mes "[Marry Happy]"; mes "Marriage is the beautiful"; @@ -166,7 +166,7 @@ prt_church,97,100,4 script Wedding Staff#w 1_F_LIBRARYGIRL,{ mes "If there was something"; mes "you didn't understand,"; mes "feel free to ask me again."; - goto L_End; + callsub L_End; } mes "[Marry Happy]"; mes "The easiest way to write"; @@ -262,7 +262,7 @@ prt_church,97,100,4 script Wedding Staff#w 1_F_LIBRARYGIRL,{ mes "you can consider marriage."; mes "After you grow stronger,"; mes "come and talk to me again."; - goto L_End; + callsub L_End; } else if (countitem(Diamond_Ring) < 1) { mes "[Marry Happy]"; @@ -272,7 +272,7 @@ prt_church,97,100,4 script Wedding Staff#w 1_F_LIBRARYGIRL,{ mes "during the wedding ceremony?"; mes "Look for it carefully and come"; mes "back after you find it, okay?"; - goto L_End; + callsub L_End; } else if (Sex == SEX_MALE) { if (Zeny < 1300000) { mes "[Marry Happy]"; @@ -281,7 +281,7 @@ prt_church,97,100,4 script Wedding Staff#w 1_F_LIBRARYGIRL,{ mes "that all grooms must pay"; mes "for the wedding ceremony."; mes "Did you misplace your money?"; - goto L_End; + callsub L_End; } else if (countitem(Tuxedo) < 1) { mes "[Marry Happy]"; @@ -291,7 +291,7 @@ prt_church,97,100,4 script Wedding Staff#w 1_F_LIBRARYGIRL,{ mes "ceremony! Find it, bring it"; mes "to me, and then we can finally"; mes "begin the wedding, okay?"; - goto L_End; + callsub L_End; } } else if (Sex == SEX_FEMALE) { if (Zeny < 1200000) { @@ -302,7 +302,7 @@ prt_church,97,100,4 script Wedding Staff#w 1_F_LIBRARYGIRL,{ mes "wedding ceremony. Perhaps"; mes "you could ask your partner"; mes "to help you with the funds?"; - goto L_End; + callsub L_End; } else if (countitem(Wedding_Dress) < 1) { mes "[Marry Happy]"; @@ -312,7 +312,7 @@ prt_church,97,100,4 script Wedding Staff#w 1_F_LIBRARYGIRL,{ mes "bring it to me-- you"; mes "absolutely need it"; mes "for the wedding!"; - goto L_End; + callsub L_End; } } mes "[Marry Happy]"; @@ -379,7 +379,7 @@ prt_church,97,100,4 script Wedding Staff#w 1_F_LIBRARYGIRL,{ } delitem Diamond_Ring,1; wedding_sign = 1; - goto L_End; + callsub L_End; } mes "[Marry Happy]"; mes "No...?"; @@ -626,7 +626,7 @@ prt_church,100,128,4 script Bishop#w 1_M_PASTOR,{ mes "It's old fashioned protocol,"; mes "but I'll admit that it does"; mes "keep things running smoothly."; - goto L_End; + callsub L_End; } mes "[Vomars]"; mes "Before you can be"; @@ -635,7 +635,7 @@ prt_church,100,128,4 script Bishop#w 1_M_PASTOR,{ mes "two with your partner."; mes "Then, we can proceed"; mes "with the ceremony."; - goto L_End; + callsub L_End; } mes "[Vomars]"; mes "You must apply for"; @@ -644,7 +644,7 @@ prt_church,100,128,4 script Bishop#w 1_M_PASTOR,{ mes "Happy Marry will let you know"; mes "what else you'll need to do"; mes "to prepare for marriage."; - goto L_End; + callsub L_End; } else if ($@wedding == 1) { if (wedding_sign == 1) { @@ -734,7 +734,7 @@ prt_church,100,128,4 script Bishop#w 1_M_PASTOR,{ mes "the ceremony has finished"; mes "Please try again once he's"; mes "returned."; - goto L_End; + callsub L_End; } else { cutin "wedding_bomars03",2; @@ -769,7 +769,7 @@ prt_church,100,128,4 script Bishop#w 1_M_PASTOR,{ mes "application. Please speak"; mes "to her so that we can begin"; mes "the wedding ceremony."; - goto L_End; + callsub L_End; } callsub S_Busy; } @@ -796,14 +796,14 @@ S_Busy: mes "Mister "+ $@wed_groom$; mes "is currently in progress."; mes "Please keep your voice down."; - goto L_End; + callsub L_End; } mes "[Vomars]"; mes "I'm conducting a wedding"; mes "for another couple now, so"; mes "please wait patiently for your"; mes "turn. Thanks for understanding... "; - goto L_End; + callsub L_End; OnStop: stopnpctimer; diff --git a/npc/quests/bard_quest.txt b/npc/quests/bard_quest.txt index 0c46a9ab6..79eca7720 100644 --- a/npc/quests/bard_quest.txt +++ b/npc/quests/bard_quest.txt @@ -166,19 +166,19 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ next; mes "[Errende]"; mes "I hope that you'll always remain honest and respectful towards other people, and that you continue to ignore greed for fortune or power."; - goto L_End; + callsub L_End; } else if (gef_bard_q > 11 && gef_bard_q < 14) { cutin "bard_eland02",2; mes "[Errende]"; mes "It seems you haven't found it yet. Well, take your time, I can wait as long as you want. It doesn't really bore me, since waiting seems to be a part of my profession."; - goto L_End; + callsub L_End; } else if (gef_bard_q == 11) { cutin "bard_eland01",2; mes "[Errende]"; mes "Mr. Skezti has a small book store on the book street at the right side of Mineta in Juno. If you show him the seal, he'll help you out."; - goto L_End; + callsub L_End; } else if (gef_bard_q == 10) { cutin "bard_eland01",2; @@ -208,7 +208,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "show him the Seal of Friendship."; mes "Good luck, now~"; gef_bard_q = 11; - goto L_End; + callsub L_End; } else if (gef_bard_q == 20) { cutin "bard_eland03",2; @@ -258,7 +258,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "[Errende]"; mes "Waaah, wah~"; mes "You can't just ignore me like that! Where's your sense of merriment, your sense of romance?"; - goto L_End; + callsub L_End; } } else if (gef_bard_q == 27) { @@ -304,7 +304,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "I beseech you, if you meet him, please ask him of the 8th love and inform me of that lyric immediately~"; gef_bard_q = 22; } - goto L_End; + callsub L_End; } else if (gef_bard_q == 26) { cutin "bard_eland01",2; @@ -358,17 +358,17 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "in advance~"; gef_bard_q = 24; } - goto L_End; + callsub L_End; } else if (.@inputstr$ == "Gunther") { mes "[Errende]"; mes "Gunther? I don't think he would do this. He always puts lines in his songs like 'doubleharmony for you.' Plus, he's too silly for that."; - goto L_End; + callsub L_End; } else if (.@inputstr$ == "Gunther Doubleharmony") { mes "[Errende]"; mes "Gunther? I don't think he would do this. He always puts lines in his songs like 'doubleharmony for you.' Plus, he's too silly for that."; - goto L_End; + callsub L_End; } else if (.@inputstr$ == "Errende") { cutin "bard_eland04",2; @@ -377,7 +377,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "If I did, why would"; mes "I not know what"; mes "this song is about?"; - goto L_End; + callsub L_End; } else { mes "[Errende]"; @@ -390,7 +390,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "How could I forget"; mes "the 8th love?"; gef_bard_q = 26; - goto L_End; + callsub L_End; } } else if (gef_bard_q == 25) { @@ -436,7 +436,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "heart wrenching song."; mes "But at what cost to your soul?^000000"; } - goto L_End; + callsub L_End; } else { cutin "bard_eland01",2; @@ -447,7 +447,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "Noboooody looooves meee"; mes "Friends foooooor never..."; mes "Ooooooooh wah!^000000"; - goto L_End; + callsub L_End; } } else if (gef_bard_q == 24) { @@ -473,7 +473,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "Once again,"; mes "thank you so much"; mes "for your help."; - goto L_End; + callsub L_End; } else if (gef_bard_q == 22) { mes "[Errende]"; @@ -489,7 +489,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ next; mes "[Errende]"; mes "Please ask ^483D8BGunther^000000 about the ^483D8B8th love^000000 in ^483D8BAt One, I Fall in Love^000000. Thank you in advance."; - goto L_End; + callsub L_End; } else if (gef_bard_q == 23) { cutin "bard_eland02",2; @@ -579,19 +579,19 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "in advance~"; gef_bard_q = 24; } - goto L_End; + callsub L_End; } else if (.@inputstr$ == "Gunther") { mes "[Errende]"; mes "Gunther? I don't think he would do this. He always puts lines in his songs like 'doubleharmony for you.' Plus, he's too silly for that."; gef_bard_q = 26; - goto L_End; + callsub L_End; } else if (.@inputstr$ == "Gunther Doubleharmony") { mes "[Errende]"; mes "Gunther? I don't think he would do this. He always puts lines in his songs like 'doubleharmony for you.' Plus, he's too silly for that."; gef_bard_q = 26; - goto L_End; + callsub L_End; } else if (.@inputstr$ == "Errende") { cutin "bard_eland04",2; @@ -601,7 +601,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "I not know what this"; mes "song is about?"; gef_bard_q = 26; - goto L_End; + callsub L_End; } else { mes "[Errende]"; @@ -614,7 +614,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "How could I forget"; mes "the 8th love?"; gef_bard_q = 26; - goto L_End; + callsub L_End; } } else if (gef_bard_q == 21) { @@ -664,7 +664,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "I beseech you, if you meet him, please ask him of the 8th love and inform me of that lyric immediately~"; gef_bard_q = 2; } - goto L_End; + callsub L_End; } else if (gef_bard_q == 6) { cutin "bard_eland04",2; @@ -708,23 +708,23 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "I'll pay you back somehow! Thank you for your trouble in advance~"; gef_bard_q = 4; } - goto L_End; + callsub L_End; } else if (.@inputstr$ == "Gunther") { mes "[Errende]"; mes "Gunther? I don't think he would do this. He always puts lines in his songs like 'doubleharmony for you.' Plus, he's too silly for that."; - goto L_End; + callsub L_End; } else if (.@inputstr$ == "Gunther Doubleharmony") { mes "[Errende]"; mes "Gunther? I don't think he would do this. He always puts lines in his songs like 'doubleharmony for you.' Plus, he's too silly for that."; - goto L_End; + callsub L_End; } else if (.@inputstr$ == "Errende") { cutin "bard_eland04",2; mes "[Errende]"; mes "Surely you jest! If I did, why would I not know what this song is about?"; - goto L_End; + callsub L_End; } else { mes "[Errende]"; @@ -736,7 +736,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "How could I forget"; mes "the 8th love?"; gef_bard_q = 6; - goto L_End; + callsub L_End; } } else if (gef_bard_q == 5) { @@ -773,7 +773,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "heart wrenching song."; mes "But at what cost to your soul?^000000"; } - goto L_End; + callsub L_End; } else { cutin "bard_eland01",2; @@ -784,7 +784,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "Noboooody looooves meee"; mes "Friends foooooor never..."; mes "Ooooooooooh wah!^000000"; - goto L_End; + callsub L_End; } } else if (gef_bard_q == 4) { @@ -809,7 +809,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "Once again,"; mes "thank you so much"; mes "for your help."; - goto L_End; + callsub L_End; } else if (gef_bard_q == 2) { cutin "bard_eland04",2; @@ -822,7 +822,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ next; mes "[Errende]"; mes "Please ask ^483D8BGunther^000000 about the ^483D8B8th love^000000 in ^483D8BAt One, I Fall in Love^000000. Thank you in advance."; - goto L_End; + callsub L_End; } else if (gef_bard_q == 3) { cutin "bard_eland02",2; @@ -907,27 +907,27 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "I'll pay you back somehow! Thank you for your trouble in advance~"; gef_bard_q = 4; } - goto L_End; + callsub L_End; } else if (.@inputstr$ == "Gunther") { mes "[Errende]"; mes "Gunther? I don't think he would do this. He always puts lines in his songs like 'doubleharmony for you.' Plus, he's too silly for that."; gef_bard_q = 6; - goto L_End; + callsub L_End; } else if (.@inputstr$ == "Gunther Doubleharmony") { mes "[Errende]"; mes "Gunther? I don't think he would do this. He always puts lines in his songs like 'doubleharmony for you.' Plus, he's too silly for that."; gef_bard_q = 6; - goto L_End; + callsub L_End; } else if (.@inputstr$ == "Errende") { cutin "bard_eland04",2; mes "[Errende]"; mes "Surely you jest! If I did, why would I not know what this song is about?"; gef_bard_q = 6; - goto L_End; + callsub L_End; } else { mes "[Errende]"; @@ -939,7 +939,7 @@ geffen,132,38,3 script Bard#2 1_M_BARD,{ mes "How could I forget"; mes "the 8th love?"; gef_bard_q = 6; - goto L_End; + callsub L_End; } } else if (gef_bard_q == 1) { @@ -1122,7 +1122,7 @@ S_StorySong: mes "[Errende]"; mes "Oh, how disappointing. But promise me that you will drop by later, so that we can share stories and merriment."; } - goto L_End; + callsub L_End; case 2: mes "[Errende]"; @@ -1156,7 +1156,7 @@ S_StorySong: mes "My apologies,"; mes "But I cannot offer my services for free. Even a Bard needs zeny to live, wouldn't you agree?"; } - goto L_End; + callsub L_End; case 2: cutin "bard_eland03",2; @@ -1225,7 +1225,7 @@ S_StorySong: mes "may never know"; mes "with certainty."; } - goto L_End; + callsub L_End; } else if (.@random == 2) { @@ -1328,7 +1328,7 @@ S_StorySong: if(gef_bard_q==1) gef_bard_q = 7; if(gef_bard_q==21) gef_bard_q = 27; } - goto L_End; + callsub L_End; } mes "^483D8BA good Bard sings"; @@ -1352,7 +1352,7 @@ S_StorySong: mes "[Errende]"; mes "H-how can you say such a thing, "+ @name$ +"? Have you ever been a Bard before? It's difficult to come up with fresh, original melodies!"; } - goto L_End; + callsub L_End; case 3: cutin "bard_eland01",2; @@ -1362,7 +1362,7 @@ S_StorySong: mes "enjoyed when you"; mes "are in the mood for it."; mes "Please come again."; - goto L_End; + callsub L_End; } @@ -1371,7 +1371,7 @@ S_StorySong: mes "[Errende]"; mes "Hmm~?"; mes "Well, alright. Though, listening to a good story or cheerful song can really do you some good. Alright then, see you later."; - goto L_End; + callsub L_End; } } diff --git a/npc/quests/bunnyband.txt b/npc/quests/bunnyband.txt index 957e3ab01..9b3537312 100644 --- a/npc/quests/bunnyband.txt +++ b/npc/quests/bunnyband.txt @@ -101,43 +101,43 @@ alberta,26,229,0 script Kafra Employee#bunny 4_M_01,{ mes "of the Kafra Services~"; close; case 2: - goto L_Info; + break; case 3: close; } - } - mes "[Kafra Employee]"; - mes "Hi there~! Would you like"; - mes "to join our special ^529DFFBunny"; - mes "Band Event^000000 hosted by the Kafra"; - mes "Corporation and sponsored by"; - mes "the Alberta Merchant Guild?"; - next; - switch(select("Join the Event", "Event Information", "Cancel")) { - case 1: - BUNYBND = 1; + } else { mes "[Kafra Employee]"; - mes "Great! Thanks for"; - mes "participating! If you"; - mes "haven't already heard,"; - mes "you need to collect these"; - mes "items if you want me put a"; - mes "Bunny Band together for you..."; + mes "Hi there~! Would you like"; + mes "to join our special ^529DFFBunny"; + mes "Band Event^000000 hosted by the Kafra"; + mes "Corporation and sponsored by"; + mes "the Alberta Merchant Guild?"; next; - mes "[Kafra Employee]"; - mes "100 Feathers,"; - mes "1 Four-Leaf Clover,"; - mes "1 Kitty Band and"; - mes "1 Pearl. That's it!"; - mes "Good luck and I'll be"; - mes "waiting for you here~"; - close; - case 2: - break; - case 3: - close; + switch(select("Join the Event", "Event Information", "Cancel")) { + case 1: + BUNYBND = 1; + mes "[Kafra Employee]"; + mes "Great! Thanks for"; + mes "participating! If you"; + mes "haven't already heard,"; + mes "you need to collect these"; + mes "items if you want me put a"; + mes "Bunny Band together for you..."; + next; + mes "[Kafra Employee]"; + mes "100 Feathers,"; + mes "1 Four-Leaf Clover,"; + mes "1 Kitty Band and"; + mes "1 Pearl. That's it!"; + mes "Good luck and I'll be"; + mes "waiting for you here~"; + close; + case 2: + break; + case 3: + close; + } } -L_Info: mes "[Kafra Employee]"; mes "To thank our valued"; mes "customers, Kafra Corporation"; diff --git a/npc/quests/cooking_quest.txt b/npc/quests/cooking_quest.txt index 3b97f60ee..048201063 100644 --- a/npc/quests/cooking_quest.txt +++ b/npc/quests/cooking_quest.txt @@ -85,7 +85,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "be careful and watch your"; mes "step when you climb up"; mes "the stairs for me, alright?"; - goto L_End; + callsub L_End; } else if (getequipid(1) != 5026) { if (Sex == SEX_MALE) { @@ -123,7 +123,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "But I do find that you"; mes "adventurers do have"; mes "your strong points..."; - goto L_End; + callsub L_End; } cutin "orleans_1",0; mes "[Charles Orleans]"; @@ -236,7 +236,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "treats that only I can offer."; mes "Until that day comes, I shall"; mes "reluctantly bid you adieu."; - goto L_End; + callsub L_End; } else if (cooking_q == 0) { cutin "orleans_5",0; @@ -342,7 +342,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "^4D4DFF1 Cooking Oil^000000, and"; mes "^4D4DFF1 Old Frying Pan^000000."; mes "Then, we can begin."; - goto L_End; + callsub L_End; } else if (.@cook_m1 == 2) { cooking_q = 2; @@ -359,7 +359,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "^4D4DFF2 Red Potions^000000"; mes "so that we can"; mes "begin the lesson~"; - goto L_End; + callsub L_End; } else if (.@cook_m1 == 3) { cooking_q = 3; @@ -375,7 +375,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "^4D4DFF1 Honey^000000,"; mes "^4D4DFF2 Grapes^000000, and"; mes "^4D4DFF1 Red Potion^000000."; - goto L_End; + callsub L_End; } else if (.@cook_m1 == 4) { cooking_q = 4; @@ -393,7 +393,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "^4D4DFF1 Bag of Grain^000000,"; mes "^4D4DFF10 Spawns^000000, and"; mes "^4D4DFF1 Squid Ink^000000."; - goto L_End; + callsub L_End; } else if (.@cook_m1 == 5) { cooking_q = 5; @@ -410,7 +410,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "^4D4DFF10 Green Herbs^000000,"; mes "^4D4DFF10 Nippers^000000, and"; mes "^4D4DFF1 Yellow Potion^000000."; - goto L_End; + callsub L_End; } cooking_q = 6; mes "[Charles Orleans]"; @@ -426,7 +426,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "^4D4DFF1 Frying Pan^000000,"; mes "^4D4DFF5 Yoyo Tails^000000, and"; mes "^4D4DFF1 Cooking Oil^000000."; - goto L_End; + callsub L_End; } else if (cooking_q == 1) { if (countitem(Grasshoppers_Leg) > 4 && countitem(Old_Frying_Pan) > 0 && countitem(Cooking_Oil) > 0) { @@ -467,7 +467,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ delitem Cooking_Oil,1; cooking_q = 7; getitem Str_Dish01,1; - goto L_End; + callsub L_End; } cutin "orleans_6",0; .@talk_j = rand(1,2); @@ -479,14 +479,14 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "If a restaurant patron had"; mes "ordered this, then you'd"; mes "already be making him wait!"; - goto L_End; + callsub L_End; } mes "[Charles Orleans]"; mes "Just go and ambush those"; mes "happy-go-lucky grasshoppers"; mes "just playing in the fields. Hurry and smash them, then rip their"; mes "legs off--but be humane about it! "; - goto L_End; + callsub L_End; } else if (cooking_q == 2) { if (countitem(Grape) > 2 && countitem(Red_Potion) > 1) { @@ -524,7 +524,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ delitem Red_Potion,2; cooking_q = 7; getitem Int_Dish01,1; - goto L_End; + callsub L_End; } cutin "orleans_6",0; .@talk_j = rand(1,2); @@ -535,7 +535,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "ingredients for Grape Juice"; mes "Herbal Tea! At a real restaurant, you'd never be able to take your"; mes "time like this! Quickly, now!"; - goto L_End; + callsub L_End; } mes "[Charles Orleans]"; mes "Having trouble finding"; @@ -543,7 +543,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "those cute little Poporings..."; mes "Of course, you should try to"; mes "be humane when you hunt them..."; - goto L_End; + callsub L_End; } else if (cooking_q == 3) { if (countitem(Honey) > 0 && countitem(Grape) > 1 && countitem(Red_Potion) > 0) { @@ -585,7 +585,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ delitem Red_Potion,1; cooking_q = 7; getitem Dex_Dish01,1; - goto L_End; + callsub L_End; } cutin "orleans_6",0; .@talk_j = rand(1,2); @@ -596,7 +596,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "brought me the ingredients"; mes "to make Honey Grape Juice"; mes "a while ago. Hurry it up!"; - goto L_End; + callsub L_End; } mes "[Charles Orleans]"; mes "You're having trouble"; @@ -605,7 +605,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "Just go and hunt some bears,"; mes "they're always carrying some"; mes "of that Honey around."; - goto L_End; + callsub L_End; } else if (cooking_q == 4) { if (countitem(Grain) > 0 && countitem(Spawn) > 9 && countitem(Chinese_Ink) > 0) { @@ -646,7 +646,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ delitem Chinese_Ink,1; //Chinese_ink cooking_q = 7; getitem Agi_Dish01,1; - goto L_End; + callsub L_End; } cutin "orleans_6",0; .@talk_j = rand(1,2); @@ -657,7 +657,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "preparing ingredients"; mes "for Frog Egg and Squid"; mes "Ink Soup right now!"; - goto L_End; + callsub L_End; } mes "[Charles Orleans]"; mes "You have to be careful"; @@ -665,7 +665,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "Eggs. If you feed them raw to"; mes "somebody, well, their flavor is"; mes "decidely less than magnifique."; - goto L_End; + callsub L_End; } else if (cooking_q == 5) { if (countitem(Nipper) > 9 && countitem(Green_Herb) > 9 && countitem(Yellow_Potion) > 0) { @@ -706,7 +706,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ delitem Yellow_Potion,1; cooking_q = 7; getitem Vit_Dish01,1; - goto L_End; + callsub L_End; } cutin "orleans_6",0; .@talk_j = rand(1,2); @@ -718,7 +718,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "Crab Nippers? You need"; mes "to work quickly for those"; mes "hungry restaurant patrons!"; - goto L_End; + callsub L_End; } mes "[Charles Orleans]"; mes "It shouldn't be too hard"; @@ -726,7 +726,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "find some Vadons and crush"; mes "them, making sure to rip off"; mes "their Nippers. That sounds strange, I know, but just do it."; - goto L_End; + callsub L_End; } else if (cooking_q == 6) { if (countitem(Yoyo_Tail) > 4 && countitem(Old_Frying_Pan) > 0 && countitem(Cooking_Oil) > 0) { @@ -767,7 +767,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ delitem Cooking_Oil,1; cooking_q = 7; getitem Luk_Dish01,1; - goto L_End; + callsub L_End; } cutin "orleans_6",0; .@talk_j = rand(1,2); @@ -779,7 +779,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "you can. In a real restaurant,"; mes "you'd never able to take your"; mes "time like this. Toute allure!"; - goto L_End; + callsub L_End; } mes "[Charles Orleans]"; mes "You need more tails?"; @@ -788,7 +788,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "and then slice off their tails."; mes "You're a beginner, but I won't"; mes "allow you to be inhumane!"; - goto L_End; + callsub L_End; } else if (cooking_q == 7) { cutin "orleans_7",0; @@ -808,7 +808,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "teaching until one of you can"; mes "become a worthy successor."; mes "It will take some time..."; - goto L_End; + callsub L_End; } else if (cooking_q == 8) { cutin "orleans_5",0; @@ -847,7 +847,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes ".....Who told you"; mes "to ask her name?"; mes "You don't even understand what she is saying."; - goto L_End; + callsub L_End; case 2: cutin "nyuang_2",2; emotion e_pif,0,"Child with Cat#cook"; @@ -863,7 +863,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "the child won't talk to us..."; mes "Still, we need to get those"; mes "two out of the kitchen."; - goto L_End; + callsub L_End; case 3: cutin "nyuang_3",2; emotion e_heh,0,"Child with Cat#cook"; @@ -876,7 +876,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "[Charles Orleans]"; mes "...Are you playing with that kid...?"; mes "...Then I don't need you to be here."; - goto L_End; + callsub L_End; case 4: emotion e_dots,0,"Child with Cat#cook"; mes "[Child with Cat]"; @@ -897,7 +897,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "You should have"; mes "been more careful"; mes "handling that cat..."; - goto L_End; + callsub L_End; } } else if (cooking_q == 9) { @@ -1029,7 +1029,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "Ah..."; mes "There goes a true"; mes "lady... Madam Wickebine..."; - goto L_End; + callsub L_End; } else if (cooking_q == 10) { cutin "orleans_5",0; @@ -1071,7 +1071,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "Praise the glories of the"; mes "Rune-Midgarts Kingdom!"; mes "Long live King Tristram III!"; - goto L_End; + callsub L_End; } else if (cooking_q == 11) { cutin "orleans_5",0; @@ -1112,7 +1112,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "1 to 5. Those are the"; mes "only cookbooks that I will"; mes "lend out to my students."; - goto L_End; + callsub L_End; } else if (.@new_book == 0) { cutin "orleans_5",0; @@ -1122,7 +1122,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "study the recipes that you"; mes "have right now before trying"; mes "something new, I suppose."; - goto L_End; + callsub L_End; } mes "[Charles Orleans]"; mes "So you wanted to borrow a"; @@ -1140,7 +1140,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "levels 1 to 5. Hmm, well, ask"; mes "me again when you remember"; mes "which cookbook you have, okay?"; - goto L_End; + callsub L_End; } else if (.@old_book == 0) { cutin "orleans_5",0; @@ -1150,7 +1150,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "study the recipes that you"; mes "have right now before trying"; mes "something new, I suppose."; - goto L_End; + callsub L_End; } else if (.@old_book == .@new_book) { cutin "orleans_4",0; @@ -1161,7 +1161,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "cookbook that you already"; mes "have? I guess you made"; mes "some sort of mistake?"; - goto L_End; + callsub L_End; } else { if (countitem(7471+.@old_book) < 1) { @@ -1172,7 +1172,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "that you'd return to me?"; mes "Find it first, and then I can"; mes "lend another cookbook to you."; - goto L_End; + callsub L_End; } cutin "orleans_2",0; mes "[Charles Orleans]"; @@ -1264,10 +1264,10 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "Oh, how I miss the"; mes "taste of Pumpkins!"; mes "Ahhh, how nostalgic~"; - goto L_End; + callsub L_End; } } - else goto L_End; + else callsub L_End; } else if (.@new_book== 2) { cutin "orleans_7",0; @@ -1298,10 +1298,10 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "soon... But the experience"; mes "isn't complete without any"; mes "Well-Baked Cookies to munch~"; - goto L_End; + callsub L_End; } } - else goto L_End; + else callsub L_End; } else if (.@new_book== 3) { cutin "orleans_7",0; @@ -1330,10 +1330,10 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "things I don't know"; mes "how to make extremely"; mes "well. Can you believe that?"; - goto L_End; + callsub L_End; } } - else goto L_End; + else callsub L_End; } else if (.@new_book== 4) { cutin "orleans_7",0; @@ -1364,10 +1364,10 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "of that delicious Bao."; mes "I'd cook it myself, but"; mes "I don't know the secret!"; - goto L_End; + callsub L_End; } } - else goto L_End; + else callsub L_End; } else if (.@new_book== 5) { cutin "orleans_7",0; @@ -1396,10 +1396,10 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "cook with those Shoots"; mes "soon, so I'd appreciate it"; mes "if you'd do this little favor~"; - goto L_End; + callsub L_End; } } - else goto L_End; + else callsub L_End; } if (.@old_book == 1) delitem Cookbook01,1; @@ -1434,7 +1434,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "good care of it--don't sell"; mes "it or lose it or anything like"; mes "that. Good luck cooking now~"; - goto L_End; + callsub L_End; case 2: cutin "orleans_3",0; @@ -1462,7 +1462,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "why my spirit to create"; mes "culinary masterpieces has"; mes "been reinvigorated lately..."; - goto L_End; + callsub L_End; case 3: cutin "orleans_5",0; @@ -1470,7 +1470,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "Please, do not worry"; mes "yourself about it. Just"; mes "let me rest for now~"; - goto L_End; + callsub L_End; } } @@ -1479,7 +1479,7 @@ prt_castle,43,30,3 script Charles Orleans#cook 4_M_OILMAN,{ mes "Mon dieu!"; mes "An error has"; mes "occurred!"; - goto L_End; + callsub L_End; } L_End: diff --git a/npc/quests/quests_airship.txt b/npc/quests/quests_airship.txt index c5c8f69b5..8c743d99a 100644 --- a/npc/quests/quests_airship.txt +++ b/npc/quests/quests_airship.txt @@ -2831,88 +2831,90 @@ airplane,33,69,4 script Kaci 1_F_MERCHANT_01,{ mes "do it himself. Reading that"; mes "letter really made my day~"; next; -L_Ask: - switch(select("Ask about Hallen", "Ask about Mawong", "Ask about the Airship")) { - case 1: - .@mesa = 1; - mes "[Kaci]"; - mes "Hallen? Well, he and I are"; - mes "pretty close. Did you know"; - mes "that we're cousins? In fact,"; - mes "his dad, my uncle, brought"; - mes "me as a child after my father"; - mes "passed away 20 years ago."; - next; - mes "[Kaci]"; - mes "There was some kind of"; - mes "mine explosion accident in"; - mes "Einbech. I don't remember."; - mes "Anyway, me and Hallen are"; - mes "like sister and brother, and"; - mes "we always stick together."; - next; - mes "[Kaci]"; - mes "When Captain Ferlock saw me"; - mes "host a Dice game by coincidence"; - mes "and then hired me to work on his Airship, Hallen insisted on coming"; - mes "along. He's stubborn like that,"; - mes "but he's also very sweet."; - next; - break; - case 2: - .@mesb = 1; - mes "[Kaci]"; - mes "Mr. Mawong? Oh, don't get"; - mes "the wrong idea! He's my"; - mes "mentor, the one who taught"; - mes "me how to play all of these"; - mes "wonderful games. He's pretty"; - mes "famous around Juno, you know."; - next; - mes "[Kaci]"; - mes "I used to be so depressed,"; - mes "not caring about the world"; - mes "at all, after my father died."; - mes "Then, I ran into Mr. Mawong,"; - mes "and he taught me how to find"; - mes "the joy in life once again."; - next; - mes "[Kaci]"; - mes "Because of him, I decided"; - mes "to learn his games and to"; - mes "help people forget their"; - mes "worries and just enjoy"; - mes "themselves, even if it's"; - mes "just for a little while."; - next; - break; - case 3: - .@mesc = 1; - mes "[Kaci]"; - mes "The Airship? It's so"; - mes "huge and beautiful, and"; - mes "I'm always amazed that it"; - mes "can fly so gracefully through"; - mes "the air. I've always wanted to live someplace close to the sky..."; - next; + while (true) { + switch (select("Ask about Hallen", "Ask about Mawong", "Ask about the Airship")) { + case 1: + .@mesa = 1; + mes "[Kaci]"; + mes "Hallen? Well, he and I are"; + mes "pretty close. Did you know"; + mes "that we're cousins? In fact,"; + mes "his dad, my uncle, brought"; + mes "me as a child after my father"; + mes "passed away 20 years ago."; + next; + mes "[Kaci]"; + mes "There was some kind of"; + mes "mine explosion accident in"; + mes "Einbech. I don't remember."; + mes "Anyway, me and Hallen are"; + mes "like sister and brother, and"; + mes "we always stick together."; + next; + mes "[Kaci]"; + mes "When Captain Ferlock saw me"; + mes "host a Dice game by coincidence"; + mes "and then hired me to work on his Airship, Hallen insisted on coming"; + mes "along. He's stubborn like that,"; + mes "but he's also very sweet."; + next; + break; + case 2: + .@mesb = 1; + mes "[Kaci]"; + mes "Mr. Mawong? Oh, don't get"; + mes "the wrong idea! He's my"; + mes "mentor, the one who taught"; + mes "me how to play all of these"; + mes "wonderful games. He's pretty"; + mes "famous around Juno, you know."; + next; + mes "[Kaci]"; + mes "I used to be so depressed,"; + mes "not caring about the world"; + mes "at all, after my father died."; + mes "Then, I ran into Mr. Mawong,"; + mes "and he taught me how to find"; + mes "the joy in life once again."; + next; + mes "[Kaci]"; + mes "Because of him, I decided"; + mes "to learn his games and to"; + mes "help people forget their"; + mes "worries and just enjoy"; + mes "themselves, even if it's"; + mes "just for a little while."; + next; + break; + case 3: + .@mesc = 1; + mes "[Kaci]"; + mes "The Airship? It's so"; + mes "huge and beautiful, and"; + mes "I'm always amazed that it"; + mes "can fly so gracefully through"; + mes "the air. I've always wanted to live someplace close to the sky..."; + next; + mes "[Kaci]"; + mes "A place where I can see"; + mes "the clouds and bask in the"; + mes "sun. So, when Captain Ferlock"; + mes "invited me to work here, it was"; + mes "like a dream come true~"; + next; + break; + } mes "[Kaci]"; - mes "A place where I can see"; - mes "the clouds and bask in the"; - mes "sun. So, when Captain Ferlock"; - mes "invited me to work here, it was"; - mes "like a dream come true~"; + mes "Please don't hesitate"; + mes "to ask me anything if"; + mes "you need a small favor,"; + mes "or if you're just curious"; + mes "about me in general~"; next; - break; + if (.@mesa && .@mesb && .@mesc) + break; } mes "[Kaci]"; - mes "Please don't hesitate"; - mes "to ask me anything if"; - mes "you need a small favor,"; - mes "or if you're just curious"; - mes "about me in general~"; - next; - if (!.@mesa || !.@mesb || !.@mesc) goto L_Ask; - mes "[Kaci]"; mes "By the way, if Hallen"; mes "bothers you with another"; mes "request, please refuse to"; @@ -3077,7 +3079,6 @@ OnTouch: } while (1) { while (1) { -L_Retry: next; input @input; if (@input < 100 || @input > 999) { @@ -3218,7 +3219,6 @@ L_Retry: case 3: mes "Initialing 4th attempt...^000000"; break; case 4: mes "Initialing final attempt...^000000"; break; } - goto L_Retry; } } end; diff --git a/npc/quests/quests_lighthalzen.txt b/npc/quests/quests_lighthalzen.txt index 66cfb0e73..26b7de092 100644 --- a/npc/quests/quests_lighthalzen.txt +++ b/npc/quests/quests_lighthalzen.txt @@ -7737,136 +7737,138 @@ yuno_pre,69,79,4 script Mr. President 4_M_PRESIDENT,{ mes "Now, I'm sure that you must"; mes "have some questions for me..."; next; -L_Mission: - switch( select( "Secret Wing's Background","Rekenber's Purpose","Secret Wing's Goal","Details about my mission","I'm ready for my mission." ) ) - { - case 1: - mes "[Karl]"; - mes "Rekenber has been"; - mes "unopposed for a very long"; - mes "time. Our nation is unhappy"; - mes "with their rule, but since our"; - mes "country lacks solidarity, the"; - mes "people can do nothing."; - next; - mes "[Karl]"; - mes "But one day, I was contacted"; - mes "by some people who claimed to"; - mes "share my sentiments against"; - mes "the Rekenber Corporation."; - mes "Later, I learned that they were"; - mes "from the Kafra Corporation."; - next; - mes "[Karl]"; - mes "Apparently, they were"; - mes "facing some aggressive"; - mes "competition from Cool"; - mes "Event Corp, which is"; - mes "actually backed by the"; - mes "Rekenber Corporation."; - next; - mes "[Karl]"; - mes "We decided to pool our"; - mes "resources to deal with what"; - mes "we perceived as a common"; - mes "enemy. Before long, we gathered"; - mes "more devotees to our cause and"; - mes "formed the ''Secret Wing.''"; - next; - mes "[Karl]"; - mes "It may be helpful for"; - mes "you to know that our"; - mes "direct contact to the"; - mes "Kafra Corporation is the"; - mes "^FF00003rd Security Team^000000. Oh, did"; - mes "you have any other questions?"; - next; - goto L_Mission; + while (true) { + switch( select( "Secret Wing's Background","Rekenber's Purpose","Secret Wing's Goal","Details about my mission","I'm ready for my mission." ) ) + { + case 1: + mes "[Karl]"; + mes "Rekenber has been"; + mes "unopposed for a very long"; + mes "time. Our nation is unhappy"; + mes "with their rule, but since our"; + mes "country lacks solidarity, the"; + mes "people can do nothing."; + next; + mes "[Karl]"; + mes "But one day, I was contacted"; + mes "by some people who claimed to"; + mes "share my sentiments against"; + mes "the Rekenber Corporation."; + mes "Later, I learned that they were"; + mes "from the Kafra Corporation."; + next; + mes "[Karl]"; + mes "Apparently, they were"; + mes "facing some aggressive"; + mes "competition from Cool"; + mes "Event Corp, which is"; + mes "actually backed by the"; + mes "Rekenber Corporation."; + next; + mes "[Karl]"; + mes "We decided to pool our"; + mes "resources to deal with what"; + mes "we perceived as a common"; + mes "enemy. Before long, we gathered"; + mes "more devotees to our cause and"; + mes "formed the ''Secret Wing.''"; + next; + mes "[Karl]"; + mes "It may be helpful for"; + mes "you to know that our"; + mes "direct contact to the"; + mes "Kafra Corporation is the"; + mes "^FF00003rd Security Team^000000. Oh, did"; + mes "you have any other questions?"; + next; + break; - case 2: - mes "[Karl]"; - mes "It's true that companies"; - mes "exist to create money, but"; - mes "the Rekenber Corporation"; - mes "is much more nefarious."; - mes "They actually want to dominate the entire Rune-Midgard continent."; - next; - mes "[Karl]"; - mes "In fact, the chairman of"; - mes "that company is shrouded"; - mes "in mystery. Although I'm"; - mes "the president, I go through"; - mes "many difficulties just to"; - mes "send a message to him."; - next; - mes "[Karl]"; - mes "It's disheartening,"; - mes "but we really have no"; - mes "idea what their true goals"; - mes "and plans might be. Now, did"; - mes "you have any other questions?"; - next; - goto L_Mission; + case 2: + mes "[Karl]"; + mes "It's true that companies"; + mes "exist to create money, but"; + mes "the Rekenber Corporation"; + mes "is much more nefarious."; + mes "They actually want to dominate the entire Rune-Midgard continent."; + next; + mes "[Karl]"; + mes "In fact, the chairman of"; + mes "that company is shrouded"; + mes "in mystery. Although I'm"; + mes "the president, I go through"; + mes "many difficulties just to"; + mes "send a message to him."; + next; + mes "[Karl]"; + mes "It's disheartening,"; + mes "but we really have no"; + mes "idea what their true goals"; + mes "and plans might be. Now, did"; + mes "you have any other questions?"; + next; + break; - case 3: - mes "[Karl]"; - mes "''Secret Wing's'' only"; - mes "goal is to destroy the"; - mes "Rekenber Corporation in"; - mes "order to break the Schwaltzvalt Republic free from its oppression."; - next; - mes "[Karl]"; - mes "Of course, we realize"; - mes "that it will take time and"; - mes "a lot of sacrifice to make"; - mes "this a reality. Now, do you"; - mes "have anything else to ask?"; - next; - goto L_Mission; + case 3: + mes "[Karl]"; + mes "''Secret Wing's'' only"; + mes "goal is to destroy the"; + mes "Rekenber Corporation in"; + mes "order to break the Schwaltzvalt Republic free from its oppression."; + next; + mes "[Karl]"; + mes "Of course, we realize"; + mes "that it will take time and"; + mes "a lot of sacrifice to make"; + mes "this a reality. Now, do you"; + mes "have anything else to ask?"; + next; + break; - case 4: - mes "[Karl]"; - mes "Ah, your next mission."; - mes "I'm ready to give you"; - mes "some of the details if"; - mes "you no longer have any"; - mes "questions to ask. Let me"; - mes "know when you are ready."; - next; - goto L_Mission; + case 4: + mes "[Karl]"; + mes "Ah, your next mission."; + mes "I'm ready to give you"; + mes "some of the details if"; + mes "you no longer have any"; + mes "questions to ask. Let me"; + mes "know when you are ready."; + next; + break; - case 5: - mes "[Karl]"; - mes "Very well, then."; - mes "Your mission will not"; - mes "be too difficult, but it does"; - mes "have great urgency so you"; - mes "must accomplish it as soon"; - mes "as you can. Understood?"; - next; - switch( select( "Wait, I have one more question!","Yes sir, Mr. President." ) ) - { - case 1: - mes "[Karl]"; - mes "Hm? I thought you"; - mes "didn't have any more"; - mes "questions. However, I still"; - mes "have the luxury to give you"; - mes "any answers that I can provide."; - next; - goto L_Mission; + case 5: + mes "[Karl]"; + mes "Very well, then."; + mes "Your mission will not"; + mes "be too difficult, but it does"; + mes "have great urgency so you"; + mes "must accomplish it as soon"; + mes "as you can. Understood?"; + next; + switch( select( "Wait, I have one more question!","Yes sir, Mr. President." ) ) + { + case 1: + mes "[Karl]"; + mes "Hm? I thought you"; + mes "didn't have any more"; + mes "questions. However, I still"; + mes "have the luxury to give you"; + mes "any answers that I can provide."; + next; + break; - case 2: - mes "[Karl]"; - mes "I'm glad to hear that."; - mes "Alright, give me a second"; - mes "to search for this file before"; - mes "I explain the mission."; - lhz_boss = 15; - close2; - cutin "",255; - end; - } + case 2: + mes "[Karl]"; + mes "I'm glad to hear that."; + mes "Alright, give me a second"; + mes "to search for this file before"; + mes "I explain the mission."; + lhz_boss = 15; + close2; + cutin "",255; + end; + } + break; + } } } else if(lhz_boss == 15) @@ -9690,68 +9692,68 @@ OnTouch: mes "You need to input the correct"; mes "password to open the door.^000000"; next; -L_Enter: - input @sneakpass; - if(@sneakpass == 738495) - { - mes "^3355FF*Beep~*"; - mes "You hear a pleasant"; - mes "sounding electronic chirp,"; - mes "signaling that you have input"; - mes "the correct password. The door"; - mes "automatically slides open."; + while (true) { + input @sneakpass; + if(@sneakpass == 738495) + { + mes "^3355FF*Beep~*"; + mes "You hear a pleasant"; + mes "sounding electronic chirp,"; + mes "signaling that you have input"; + mes "the correct password. The door"; + mes "automatically slides open."; + next; + switch( select( "Enter","Retreat" ) ) + { + case 1: + mes "[Security System]"; + mes "You have 3 minutes to"; + mes "search the Information Archive."; + mes "When this time elapses, you"; + mes "will be automatically sent"; + mes "outside for security reasons."; + close2; + lhz_boss = 29; + donpcevent "Timer_Sneak::OnEnter"; + warp "lhz_in01",177,35; + end; + + case 2: + mes "^3355FFPerhaps now would"; + mes "not be the best time to"; + mes "enter the Secret Archive."; + mes "Or at least, that's what"; + mes "you've decided for yourself.^000000"; + close; + } + } + mes "^3355FF*Eeeeeee*"; + mes "The door emits an"; + mes "unnerving, high pitched"; + mes "screech after you input"; + mes "the password. You really"; + mes "should try to input it again.^000000"; + ++@sneakerror; next; - switch( select( "Enter","Retreat" ) ) + if(@sneakerror > 2) { - case 1: mes "[Security System]"; - mes "You have 3 minutes to"; - mes "search the Information Archive."; - mes "When this time elapses, you"; - mes "will be automatically sent"; - mes "outside for security reasons."; + mes "*Gzzzzz*"; + mes "You have entered the"; + mes "password incorrectly"; + mes "3 times. Please stand by"; + mes "for managerial assistance."; + next; + mes "^3355FFUh oh!"; + mes "You better get"; + mes "out of here before"; + mes "you get caught!^000000"; close2; - lhz_boss = 29; - donpcevent "Timer_Sneak::OnEnter"; - warp "lhz_in01",177,35; + warp "lhz_in01",191,49; end; - - case 2: - mes "^3355FFPerhaps now would"; - mes "not be the best time to"; - mes "enter the Secret Archive."; - mes "Or at least, that's what"; - mes "you've decided for yourself.^000000"; - close; } - } - mes "^3355FF*Eeeeeee*"; - mes "The door emits an"; - mes "unnerving, high pitched"; - mes "screech after you input"; - mes "the password. You really"; - mes "should try to input it again.^000000"; - ++@sneakerror; - next; - if(@sneakerror > 2) - { - mes "[Security System]"; - mes "*Gzzzzz*"; - mes "You have entered the"; - mes "password incorrectly"; - mes "3 times. Please stand by"; - mes "for managerial assistance."; - next; - mes "^3355FFUh oh!"; - mes "You better get"; - mes "out of here before"; - mes "you get caught!^000000"; - close2; - warp "lhz_in01",191,49; - end; - } - goto L_Enter; + } case 2: mes "^3355FFPerhaps now would"; @@ -9812,113 +9814,114 @@ lhz_in01,182,35,0 script File Search Engine HIDDEN_NPC,{ mes "keywords to in order to find"; mes "specific file locations."; next; -L_Search: - switch( select( "Search Engine.","Cancel." ) ) - { - case 1: - mes "^663300- Search Engine Initiated -"; - mes "- Please enter a keyword -"; - mes " "; - mes "*Search Engine"; - mes "is case sensitve."; - mes "Please do not use"; - mes "capital letters.^000000"; - next; - input @sneaksearch$; - if((@sneaksearch$ == "kafra") || (@sneaksearch$ == "cool event")) - { - mes "^663300[Search Result]"; - mes "Documents regarding"; - mes "Kafra Corporation and"; - mes "Cool Event Corp are"; - mes "located in Arena 3-2.^000000"; - lhz_boss = 30; - close; - } - else if(@sneaksearch$ == "shinokas") - { - mes "^663300[Search Result]"; - mes "Documents regarding"; - mes "Shinokas are located"; - mes "in Arena 1-5.^000000"; - lhz_boss = 31; - close; - } - else if((@sneaksearch$ == "stein") || (@sneaksearch$ == "STEIN") || (@sneaksearch$ == "S.T.E.I.N")) - { - mes "^663300[Search Result]"; - mes "Documents regarding"; - mes "S.T.E.I.N are considered"; - mes "highly classified and"; - mes "cannot be accessed"; - mes "through this system.^000000"; - close; - } - else if(@sneaksearch$ == "ymir") - { - mes "^663300[Search Result]"; - mes "Documents regarding"; - mes "Ymir's Heart are ranked"; - mes "as highly classified and"; - mes "cannot be accessed"; - mes "through this system.^000000"; - close; - } - else if((@sneaksearch$ == "president") || (@sneaksearch$ == "karl") || (@sneaksearch$ == "weierstrass")) - { - mes "^663300[Search Result]"; - mes "2nd Class documents on"; - mes "President Karl Weierstrass"; - mes "are located in Area 1-7. For"; - mes "more highly classified files"; - mes "on Weierstrass, please use"; - mes "a higher security archive.^000000"; - lhz_boss = 32; - close; - } - else if(@sneaksearch$ == "einbroch") - { - mes "^663300[Search Result]"; - mes "Documents regarding"; - mes "Einbroch are stored"; - mes "in Area 6-1.^000000"; - lhz_boss = 33; - close; - } - else if(@sneaksearch$ == "lighthalzen") - { - mes "^663300[Search Result]" ; - mes "Documents regarding"; - mes "Lighthalzen are stored"; - mes "in Area 3-3.^000000"; - lhz_boss = 34; - close; - } - else if(@sneaksearch$ == "rekenber") - { - mes "^663300[Search Result]"; - mes "Documents regarding"; - mes "Rekenber are highly classified and cannot be accessed by this system.^000000"; + while (true) { + switch( select( "Search Engine.","Cancel." ) ) + { + case 1: + mes "^663300- Search Engine Initiated -"; + mes "- Please enter a keyword -"; + mes " "; + mes "*Search Engine"; + mes "is case sensitve."; + mes "Please do not use"; + mes "capital letters.^000000"; next; - goto L_Search; - } - else - { - mes "^663300[Search Result]"; - mes "Keyword not found."; - mes "Please search another"; - mes "archive or increase"; - mes "access permissions.^000000"; - close; - } + input @sneaksearch$; + if((@sneaksearch$ == "kafra") || (@sneaksearch$ == "cool event")) + { + mes "^663300[Search Result]"; + mes "Documents regarding"; + mes "Kafra Corporation and"; + mes "Cool Event Corp are"; + mes "located in Arena 3-2.^000000"; + lhz_boss = 30; + close; + } + else if(@sneaksearch$ == "shinokas") + { + mes "^663300[Search Result]"; + mes "Documents regarding"; + mes "Shinokas are located"; + mes "in Arena 1-5.^000000"; + lhz_boss = 31; + close; + } + else if((@sneaksearch$ == "stein") || (@sneaksearch$ == "STEIN") || (@sneaksearch$ == "S.T.E.I.N")) + { + mes "^663300[Search Result]"; + mes "Documents regarding"; + mes "S.T.E.I.N are considered"; + mes "highly classified and"; + mes "cannot be accessed"; + mes "through this system.^000000"; + close; + } + else if(@sneaksearch$ == "ymir") + { + mes "^663300[Search Result]"; + mes "Documents regarding"; + mes "Ymir's Heart are ranked"; + mes "as highly classified and"; + mes "cannot be accessed"; + mes "through this system.^000000"; + close; + } + else if((@sneaksearch$ == "president") || (@sneaksearch$ == "karl") || (@sneaksearch$ == "weierstrass")) + { + mes "^663300[Search Result]"; + mes "2nd Class documents on"; + mes "President Karl Weierstrass"; + mes "are located in Area 1-7. For"; + mes "more highly classified files"; + mes "on Weierstrass, please use"; + mes "a higher security archive.^000000"; + lhz_boss = 32; + close; + } + else if(@sneaksearch$ == "einbroch") + { + mes "^663300[Search Result]"; + mes "Documents regarding"; + mes "Einbroch are stored"; + mes "in Area 6-1.^000000"; + lhz_boss = 33; + close; + } + else if(@sneaksearch$ == "lighthalzen") + { + mes "^663300[Search Result]" ; + mes "Documents regarding"; + mes "Lighthalzen are stored"; + mes "in Area 3-3.^000000"; + lhz_boss = 34; + close; + } + else if(@sneaksearch$ == "rekenber") + { + mes "^663300[Search Result]"; + mes "Documents regarding"; + mes "Rekenber are highly classified and cannot be accessed by this system.^000000"; + next; + break; + } + else + { + mes "^663300[Search Result]"; + mes "Keyword not found."; + mes "Please search another"; + mes "archive or increase"; + mes "access permissions.^000000"; + close; + } - case 2: - mes "^663300[Search Engine Close]"; - mes "File search has been"; - mes "canceled. Please be aware"; - mes "that sudden shutdown may"; - mes "cause system errors.^000000"; - close; + case 2: + mes "^663300[Search Engine Close]"; + mes "File search has been"; + mes "canceled. Please be aware"; + mes "that sudden shutdown may"; + mes "cause system errors.^000000"; + close; + } } } mes "^3355FFThis machine can be"; diff --git a/npc/quests/quests_rachel.txt b/npc/quests/quests_rachel.txt index f2282106e..59baa6f04 100644 --- a/npc/quests/quests_rachel.txt +++ b/npc/quests/quests_rachel.txt @@ -3817,7 +3817,7 @@ ra_temple,116,174,3 script Nemma#ra_temple 4_F_TRAINEE,{ mes "wouldn't come here to pray..."; mes "Well, I hope you enjoy your"; mes "time here, adventurer."; - goto L_End; + callsub L_End; } mes "[Priestess Nemma]"; mes "Oh! I'm glad to see that"; @@ -3870,7 +3870,7 @@ ra_temple,116,174,3 script Nemma#ra_temple 4_F_TRAINEE,{ mes "all your journeys. May the"; mes "grace of the goddess always"; mes "support us in all that we do~"; - goto L_End; + callsub L_End; } mes "[Priestess Nemma]"; mes "Great! How much would you"; @@ -3899,7 +3899,7 @@ ra_temple,116,174,3 script Nemma#ra_temple 4_F_TRAINEE,{ mes "protecting you, wherever you go~"; break; } - goto L_End; + callsub L_End; } else { cutin "ra_nemma03",2; @@ -3940,7 +3940,7 @@ ra_temple,116,174,3 script Nemma#ra_temple 4_F_TRAINEE,{ mes "protecting you, wherever you go~"; break; } - goto L_End; + callsub L_End; case 2: mes "[Priestess Nemma]"; mes "Oh! If you'd like some"; @@ -3969,7 +3969,7 @@ ra_temple,116,174,3 script Nemma#ra_temple 4_F_TRAINEE,{ mes "Oh, how sweet of you~"; break; } - goto L_End; + callsub L_End; } } else { @@ -3977,7 +3977,7 @@ ra_temple,116,174,3 script Nemma#ra_temple 4_F_TRAINEE,{ cutin "ra_nemma01",2; mes "[Priestess Nemma]"; mes "Welcome to our temple!"; - goto L_End; + callsub L_End; } if (ra_tem_q < 1) { mes "[Priestess Nemma]"; @@ -4010,7 +4010,7 @@ ra_temple,116,174,3 script Nemma#ra_temple 4_F_TRAINEE,{ mes "to go inside. ^333333*Sob*^000000 P-Panno!"; mes "Panno, I neeeed heeeeelp~!"; ra_tem_q = 1; - goto L_End; + callsub L_End; } else if ((ra_tem_q >= 1) && (ra_tem_q < 10)) { mes "[Priestess Nemma]"; @@ -4025,7 +4025,7 @@ ra_temple,116,174,3 script Nemma#ra_temple 4_F_TRAINEE,{ mes "Panno would know"; mes "what to do... I think."; mes "Ooh, Panno, help me!"; - goto L_End; + callsub L_End; } else if (ra_tem_q == 10) { cutin "ra_nemma04",2; @@ -4051,7 +4051,7 @@ ra_temple,116,174,3 script Nemma#ra_temple 4_F_TRAINEE,{ mes "I'm outside. What if"; mes "the gate locks up again?"; mes "Oooh, what should I do?!"; - goto L_End; + callsub L_End; } else if (ra_tem_q == 11) { emotion e_ho; @@ -4063,7 +4063,7 @@ ra_temple,116,174,3 script Nemma#ra_temple 4_F_TRAINEE,{ mes "longer asking for donations,"; mes "but you can still redeem your"; mes "Lottery Tickets inside, okay?"; - goto L_End; + callsub L_End; } else if (ra_tem_q == 12) { mes "[Priestess Nemma]"; @@ -4090,7 +4090,7 @@ ra_temple,116,174,3 script Nemma#ra_temple 4_F_TRAINEE,{ mes "like, ^FF000020 of them^000000! Thank"; mes "you thank you thank you!"; ra_tem_q = 13; - goto L_End; + callsub L_End; } else if (ra_tem_q == 13) { mes "[Priestess Nemma]"; @@ -4125,7 +4125,7 @@ ra_temple,116,174,3 script Nemma#ra_temple 4_F_TRAINEE,{ mes "to play! Hm, maybe"; mes "our pope would like"; mes "to see these too?"; - goto L_End; + callsub L_End; } cutin "ra_nemma02",2; mes "[Priestess Nemma]"; @@ -4144,14 +4144,14 @@ ra_temple,116,174,3 script Nemma#ra_temple 4_F_TRAINEE,{ mes "have much to pay you"; mes "back with, anyway~"; } - goto L_End; + callsub L_End; } else { cutin "ra_nemma01",2; mes "[Priestess Nemma]"; mes "Welcome to our temple!"; } - goto L_End; + callsub L_End; } L_End: @@ -6318,15 +6318,16 @@ ra_temin,170,46,3 script Panno#rachel 4_F_TRAINEE,{ mes "Have you come to"; mes "redeem Lottery Tickets?"; next; - if (select("Yes", "No") == 1) goto L_Lottery; - if (ra_tem_q == 12) { - cutin "ra_fano01",2; - mes "[Priestess Panno]"; - mes "I already told you"; - mes "everything I know."; - mes "Remember to keep"; - mes "quiet about what I said."; - goto L_End; + if (select("Yes", "No") == 2) { + if (ra_tem_q == 12) { + cutin "ra_fano01",2; + mes "[Priestess Panno]"; + mes "I already told you"; + mes "everything I know."; + mes "Remember to keep"; + mes "quiet about what I said."; + callsub L_End; + } } } else if (ra_tem_q < 2) { @@ -6347,15 +6348,17 @@ ra_temin,170,46,3 script Panno#rachel 4_F_TRAINEE,{ mes "know, in case you were saving"; mes "them for some weird reason."; next; - if (select("Yes", "No") == 1) goto L_Lottery; - cutin "ra_fano03",2; - mes "[Priestess Panno]"; - mes "You can redeem your"; - mes "Lottery Tickets at any"; - mes "time, so please visit"; - mes "me at your leisure."; - mes "Go with Freya."; - goto L_End; + if (select("Yes", "No") == 2) { + cutin "ra_fano03",2; + mes "[Priestess Panno]"; + mes "You can redeem your"; + mes "Lottery Tickets at any"; + mes "time, so please visit"; + mes "me at your leisure."; + mes "Go with Freya."; + callsub L_End; + } + break; case 2: cutin "ra_fano01",2; @@ -6394,14 +6397,14 @@ ra_temin,170,46,3 script Panno#rachel 4_F_TRAINEE,{ mes "side of the hallway. However,"; mes "you can only enter if you've"; mes "been permitted beforehand."; - goto L_End; + callsub L_End; case 3: mes "[Priestess Panno]"; mes "......................"; mes "No chit-chat"; mes "inside the temple."; - goto L_End; + callsub L_End; } } else if (ra_tem_q == 10) { @@ -6429,14 +6432,16 @@ ra_temin,170,46,3 script Panno#rachel 4_F_TRAINEE,{ mes "know, in case you were saving"; mes "them for some weird reason."; next; - if (select("Yes", "No") == 1) goto L_Lottery; - mes "[Priestess Panno]"; - mes "You can redeem your"; - mes "Lottery Tickets at any"; - mes "time, so please visit"; - mes "me at your leisure."; - mes "Go with Freya."; - goto L_End; + if (select("Yes", "No") == 2) { + mes "[Priestess Panno]"; + mes "You can redeem your"; + mes "Lottery Tickets at any"; + mes "time, so please visit"; + mes "me at your leisure."; + mes "Go with Freya."; + callsub L_End; + } + break; case 2: cutin "ra_fano01",2; @@ -6475,7 +6480,7 @@ ra_temin,170,46,3 script Panno#rachel 4_F_TRAINEE,{ mes "side of the hallway. However,"; mes "you can only enter if you've"; mes "been permitted beforehand."; - goto L_End; + callsub L_End; case 3: cutin "ra_fano02",2; @@ -6522,7 +6527,7 @@ ra_temin,170,46,3 script Panno#rachel 4_F_TRAINEE,{ mes "[Priestess Panno]"; mes "........."; ra_tem_q = 11; - goto L_End; + callsub L_End; } } else if (ra_tem_q == 11) { @@ -6657,17 +6662,17 @@ ra_temin,170,46,3 script Panno#rachel 4_F_TRAINEE,{ mes "Excuse me now, I need"; mes "to get back to work."; ra_tem_q = 12; - goto L_End; + callsub L_End; + } + else { + cutin "ra_fano02",2; + mes "[Priestess Panno]"; + mes "This is a holy place"; + mes "Behave yourself, and"; + mes "respect those who have"; + mes "come here just to worship."; + callsub L_End; } - cutin "ra_fano02",2; - mes "[Priestess Panno]"; - mes "This is a holy place"; - mes "Behave yourself, and"; - mes "respect those who have"; - mes "come here just to worship."; - goto L_End; - -L_Lottery: if(checkweight(Yggdrasilberry,1) == 0){ cutin "ra_fano02",2; mes "[Priestess Panno]"; @@ -6677,7 +6682,7 @@ L_Lottery: mes "something large, unwieldy"; mes "and heavy? Put your junk"; mes "away in Storage first."; - goto L_End; + callsub L_End; } mes "[Priestess Panno]"; mes "Here we go"; @@ -6713,7 +6718,7 @@ L_Lottery: else if (.@bonus_donate > 5 && .@bonus_donate < 11) getitem Honey,1; //Honey 5% else if (.@bonus_donate > 0 && .@bonus_donate < 6) getitem Royal_Jelly,1; //Royal Jelly 5% else getitem White_Slim_Potion,1; //Condensed White Potion 39% - goto L_End; + callsub L_End; } mes "[Priestess Panno]"; mes "You..."; @@ -6733,7 +6738,7 @@ L_Lottery: cutin "ra_fano03",2; mes "[Priestess Panno]"; mes "May Freya be with you."; - goto L_End; + callsub L_End; L_End: close2; @@ -7441,8 +7446,8 @@ OnTouch: } rachel,142,167,5 script Seeking Follower#rachel 4_F_MASK1,6,6,{ +OnTouch: if ((lost_boy == 13) && (ra_tem_q == 20)) { - L_Mes: mes "[Arunafeltz Follower]"; mes "Excuse me, but"; mes "are you "+strcharinfo(PC_NAME)+"?"; @@ -7469,8 +7474,5 @@ rachel,142,167,5 script Seeking Follower#rachel 4_F_MASK1,6,6,{ mes "on your journeys..."; close; } - -OnTouch: - if ((lost_boy == 13) && (ra_tem_q == 20)) goto L_Mes; end; } diff --git a/npc/quests/thana_quest.txt b/npc/quests/thana_quest.txt index 4c42f6b39..53c7b331f 100644 --- a/npc/quests/thana_quest.txt +++ b/npc/quests/thana_quest.txt @@ -265,7 +265,7 @@ tha_t01,149,78,4 script Guide 4_F_01,{ mes "to access the higher levels"; mes "here in Thanatos Tower."; next; - goto L_Contract; + break; case 3: mes "[Ditze]"; mes "To develop the floors above"; @@ -276,6 +276,7 @@ tha_t01,149,78,4 script Guide 4_F_01,{ mes "for us under a temp contract?"; close; } + break; case 2: mes "[Ditze]"; mes "You may have already heard"; @@ -291,7 +292,7 @@ tha_t01,149,78,4 script Guide 4_F_01,{ mes "to access the higher levels"; mes "here in Thanatos Tower."; next; - goto L_Contract; + break; case 3: mes "[Ditze]"; mes "Well, if you have any"; @@ -300,16 +301,15 @@ tha_t01,149,78,4 script Guide 4_F_01,{ mes "Ditze Lappa. Have a good day!"; close; } + } else { + mes "[Ditze]"; + mes "For more detailed information"; + mes "about monster exterminations,"; + mes "please ask the 2nd Floor Guide"; + mes "and the Guide next to me. Well,"; + mes "we hope you enjoy your experience working with Rekenber Corporation~"; + close; } - mes "[Ditze]"; - mes "For more detailed information"; - mes "about monster exterminations,"; - mes "please ask the 2nd Floor Guide"; - mes "and the Guide next to me. Well,"; - mes "we hope you enjoy your experience working with Rekenber Corporation~"; - close; - -L_Contract: switch(select("Maybe next time", "Sure, I'd like to work for you.")) { case 1: mes "[Ditze]"; @@ -930,7 +930,6 @@ tha_t03,67,70,0 script Rune Device#tt1 HIDDEN_NPC,4,4,{ mes "field fizzles out with a soft,"; mes "gentle ''pzzzzzh'' sound.^000000"; next; - goto L_Key; } else if (getequipweaponlv(4) == 4) { mes "^3355FFWith your "+getequipname(4)+" in"; @@ -939,7 +938,6 @@ tha_t03,67,70,0 script Rune Device#tt1 HIDDEN_NPC,4,4,{ mes "field fizzles out with a soft,"; mes "gentle ''pzzzzzh'' sound.^000000"; next; - goto L_Key; } else { mes "^3355FFYou smash the energy"; @@ -951,21 +949,16 @@ tha_t03,67,70,0 script Rune Device#tt1 HIDDEN_NPC,4,4,{ mes "powerful weapon...^000000"; close; } + break; case 2: mes "^3355FFYou decide to leave"; mes "the machine alone.^000000"; close; } + } else { + mes "You've acquired everything you need from this rune device."; + close; } - mes "You've acquired everything you need from this rune device."; - close; - -OnTouch: - if ((countitem(Key_Red) == 0) && (countitem(Magic_Gem_Red) == 0)) - specialeffect EF_LEVEL99_4; - end; - -L_Key: specialeffect EF_BRANDISH2; mes "After breaking the device, the exterior shatters."; mes "The energy field begins to disappear,"; @@ -1024,6 +1017,11 @@ L_Key: specialeffect2 EF_COMBOATTACK1; close; } + +OnTouch: + if ((countitem(Key_Red) == 0) && (countitem(Magic_Gem_Red) == 0)) + specialeffect EF_LEVEL99_4; + end; } tha_t04,195,195,0 script Rune Device#tt2 HIDDEN_NPC,3,3,{ diff --git a/npc/re/instances/BangungotHospital.txt b/npc/re/instances/BangungotHospital.txt index 3962ee4fa..424626ac9 100644 --- a/npc/re/instances/BangungotHospital.txt +++ b/npc/re/instances/BangungotHospital.txt @@ -48,7 +48,7 @@ ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{ else if (malaya_bang == 31) callsub L_Closed,0; else - goto L_NoParty; + callsub L_NoParty; } if (questprogress(11309,HUNTING) != 2) { .@playtime = questprogress(9224,PLAYTIME); @@ -100,7 +100,7 @@ ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{ cutin "",255; end; } else { - //if (!.@party_id) goto L_NoParty; //unneeded + //if (!.@party_id) callsub L_NoParty; //unneeded if (malaya_bang > 39) callsub L_Enter,(getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2))?1:0,1,1; else { @@ -122,7 +122,7 @@ ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{ end; } } else if (.@quest == 1) { - if (!.@party_id) goto L_NoParty; + if (!.@party_id) callsub L_NoParty; if (malaya_bang > 39) { if (questprogress(9222,HUNTING) == 1) { .@playtime = questprogress(9224,PLAYTIME); @@ -132,7 +132,7 @@ ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{ next; callsub L_Enter,0,0; } else if (.@playtime == 2) { - //if (!.@party_id) goto L_NoParty; //unneeded + //if (!.@party_id) callsub L_NoParty; //unneeded if (malaya_bang > 39) callsub L_Enter,(getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2))?1:0,1,1; else { @@ -211,7 +211,7 @@ ma_dun01,147,10,5 script Nurse#ma_dun01 4_F_NURSE,{ cutin "",255; end; } else { - if (!.@party_id) goto L_NoParty; + if (!.@party_id) callsub L_NoParty; if (malaya_bang > 39) callsub L_Enter,(getcharid(CHAR_ID_CHAR) == getpartyleader(.@party_id,2))?1:0,1,1; else { diff --git a/npc/re/jobs/2e/kagerou_oboro.txt b/npc/re/jobs/2e/kagerou_oboro.txt index ae28e7b2d..08f8d6024 100644 --- a/npc/re/jobs/2e/kagerou_oboro.txt +++ b/npc/re/jobs/2e/kagerou_oboro.txt @@ -786,208 +786,204 @@ job_ko,81,124,4 script Cougar#ko 4_M_JOB_ASSASSIN,{ warp "amatsu",147,136; end; } - if (job_kagero != 5) { - goto L_Kick; - } - if (MaxWeight - Weight < 1000 || checkweight("Knife",1) == 0) { - mes "[Cougar]"; - mes "This is a test of knowledge, so why did you bring so many things?"; - close; - } - set .@ko_test_01, questprogress(5136); - set .@ko_test_01_1, questprogress(5139); - if (.@ko_test_01 == 1 && .@ko_test_01_1 == 0) { - mes "[Cougar]"; - mes "It's been a while."; - next; - select("Aren't you..."); - mes "[Cougar]"; - mes "I remember you from before looking for the way of the ninja."; - next; - mes "[Cougar]"; - mes "You've grown this strong already?"; - next; - mes "[Cougar]"; - mes "Ha ha ha-"; - mes "A truly determined youth! I like that."; - next; - mes "[Cougar]"; - mes "Good! The test you are about to take is the ^339CCCTest of Knowledge^000000."; - next; - mes "[Cougar]"; - mes "I hope you haven't been lazy with your studies while focusing on getting stronger?"; - next; - switch(select("Yes", "No")) { - case 1: - setquest 5139; - mes "[Cougar]"; - mes "That's a relief. Let me know when you are ready to start the test."; - close; - case 2: - setquest 5139; + if (job_kagero == 5) { + if (MaxWeight - Weight < 1000 || checkweight("Knife",1) == 0) { mes "[Cougar]"; - mes "So you were all talk? Well, let me know when you are ready then."; + mes "This is a test of knowledge, so why did you bring so many things?"; close; } - } else if (.@ko_test_01 == 1 && .@ko_test_01_1 == 1) { - mes "[Cougar]"; - mes "I'm ready at my end. Are you ready for the test?"; - next; - if(select("Yes", "No") == 2) { + set .@ko_test_01, questprogress(5136); + set .@ko_test_01_1, questprogress(5139); + if (.@ko_test_01 == 1 && .@ko_test_01_1 == 0) { mes "[Cougar]"; - mes "Well, what can I do but wait for you."; - close; - } - mes "[Cougar]"; - mes "This isn't your first test, is it?"; - next; - mes "[Cougar]"; - mes "You only need to choose the correct answer to my questions."; - next; - mes "[Cougar]"; - mes "Let's start."; - next; - - set .@questions,10; // number of questions to ask - - // shuffle array an array of questions to be asked - freeloop(1); - setarray .@n[0], - 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25, - 26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50; - for (set .@i,getarraysize(.@n)-1; .@i>0; set .@i,.@i-1) { - set .@rand, rand(.@i); - set .@tmp, .@n[.@i]; - set .@n[.@i], .@n[.@rand]; - set .@n[.@rand], .@tmp; - } - deletearray .@n[10],getarraysize(.@n) - .@questions; - freeloop(0); - - set @job_ko_cougar,0; - for (set .@i,1; .@i<=.@questions; set .@i,.@i+1) { + mes "It's been a while."; + next; + select("Aren't you..."); mes "[Cougar]"; - mes (.@i < .@questions)?"Question number "+.@i+":":"Last question:"; - switch (.@n[.@i-1]) { - case 1: callsub L_Question,"What is the DEX + LUK total for a Job Master?",2,"8:10:12:14"; break; - case 2: callsub L_Question,"What is the highest job level for a ninja?",1,"70:50:99:100"; break; - case 3: callsub L_Question,"How many skill points do you need to master the Throw Coins skill?",3,"25:30:35:37"; break; - case 4: callsub L_Question,"Which of the following is the correct number of Evasion and effect duration for Mirror Image level 10?",4,"Up to 7 and 200 seconds:Up to 5 and 220 seconds:Up to 6 and 240 seconds:Up to 5 and 240 seconds"; break; - case 5: callsub L_Question,"How many skill points do you need to master the Cicada Skin Shed?",1,"5:3:1:4"; break; - case 6: callsub L_Question,"If Dagger Throwing Practice is at 7, how much ATK is added to Shuriken attacks?",2,"18:21:27:30"; break; - case 7: callsub L_Question,"What is the basic attack range for Throw Shuriken?",3,"7 blocks:8 blocks:9 blocks:10 blocks"; break; - case 8: callsub L_Question,"What is the maximum moving range of Shadow Leap?",4,"6 blocks:7 blocks:8 blocks:9 blocks"; break; - case 9: callsub L_Question,"How much money is used for Throw Coins level 6?",4,"2000-8000:1000-6000:3000-8000:3000-6000"; break; - case 10: callsub L_Question,"What is the most important aspect of increasing ATK for the Killing Strike skill?",2,"VIT:MAXHP:INT:MAXSP"; break; - case 11: callsub L_Question,"What is not the effect you get after reaching the STR status?",3,"Close range attack increase:Weight limit increase:Magic attack increase:Weapon attack increase"; break; - case 12: callsub L_Question,"What is not the effect you get after reaching the INT status?",4,"MAXSP increase:MATK increase:Magic damage increase:Staff attack increase"; break; - case 13: callsub L_Question,"What is not the effect you get after reaching the DEX status?",2,"Casting time decrease:Evasion increase:Accuracy increase:Long range attack increase"; break; - case 14: callsub L_Question,"What is not the effect you get after reaching the AGI status?",1,"Accuracy increase:Flee increase:Attack speed increase:Delay after attack decrease"; break; - case 15: callsub L_Question,"What is not the effect you get after reaching the VIT status?",4,"Weapon defense increase:MAXHP increase:Magic defense increase:Attack increase"; break; - case 16: callsub L_Question,"What is not the effect you get after reaching the LUK status?",3,"Accuracy increase:Complete evasion increase:Magic damage decrease:Critical rate increase"; break; - case 17: callsub L_Question,"You need to equip a card to your shoes to enhance Killing Strike attack. Which of the following is the appropriate card to equip?",2,"Gold Acidus Card:Matyr Card:Odium of Thantos Card:Eddga Card"; break; - case 18: callsub L_Question,"You need a catalyst to use ninja skills. Which of the following skills does not need a catalyst?",3,"Blaze Shield:Watery Evasion:Flaming Petals:Snow Flake Draft"; break; - case 19: callsub L_Question,"How much does STR/INT go up when Ninja Aura level 5 is used?",2,"4:5:6:7"; break; - case 20: callsub L_Question,"You are hunting the Orc Warrior. Which Kunai would you use? ",1,"Heat Wave Kunai:Icicle Kunai:Fell Poison Kunai:High Wind Kunai"; break; - case 21: callsub L_Question,"Which village is the Ninja Guild located in?",2,"Lutie:Amatsu:Dewata:Comodo"; break; - case 22: callsub L_Question,"How do Ninjas get promoted?",3,"By Val Kiwi:By Randgris:None:By Valkyrie"; break; - case 23: callsub L_Question,"What was next to me when you first met me?",4,"A cushion:A folding screen:A flowerpot:A brazier"; break; - case 24: callsub L_Question,"What is the level of Dagger Throwing Practice you have to reach to learn the Killing Strike skill?",1,"7:5:6:8"; break; - case 25: callsub L_Question,"How many hits does a Throw Kunai give to a monster?",2,"2:3:4:5"; break; - case 26: callsub L_Question,"When your First Wind is at level 4, what will go with the MATK and range?",3,"MATK400, 8 blocks:MATK500, 7 blocks:MATK500, 8 blocks:MATK400, 7 blocks"; break; - case 27: callsub L_Question,"Which of the following skills can't you learn at Dagger Throwing Practice level 7?",4,"Throw Kunai:Throw Huuma Shuriken:Killing Strike:Throw Coins"; break; - case 28: callsub L_Question,"What level do you have to be in Dagger Throwing Practice in order to learn the Throw Coins skill?",4,"4:6:8:10"; break; - case 29: callsub L_Question,"What is the attack range for the Exploding Dragon?",3,"3*3:4*4:5*5:6*6"; break; - case 30: callsub L_Question,"How long is the effect time for the Watery Evasion level 7 skill?",2,"40 seconds:45 seconds:50 seconds:55 seconds"; break; - case 31: callsub L_Question,"What is the attack effect for Haze Slasher level 4?",1,"140%:150%:160%:170%"; break; - case 32: callsub L_Question,"How much power is in the Huuma Blaze Shuriken weapon?",1,"Fireball 5 , DEX-2:Fireball 5 , DEX-3:Fireball 4 , DEX-2:Fireball 4 , DEX-3"; break; - case 33: callsub L_Question,"How much power is in the Murasame weapon?",2,"Human attack 10%:Human critical +10:Demon attack 10%:Demon critical +10"; break; - case 34: callsub L_Question,"What is the maximum hit number for Blaze Shield level 10?",3,"7:8:9:10"; break; - case 35: callsub L_Question,"What is the property of the Lightning Jolt?",4,"Fire:Water:Ground:Wind"; break; - case 36: callsub L_Question,"You are creating a weapon for small monsters. What is the best card to use?",4,"Hydra Card:Minorous Card:Skel Woker Card:Desert Wolf Card"; break; - case 37: callsub L_Question,"You are creating a weapon for mid-sized monsters. What is the best card to use?",3,"Hydra Card:Minorous Card:Skel Woker Card:Desert Wolf Card"; break; - case 38: callsub L_Question,"You are creating a weapon for huge monsters. What is the best card to use?",2,"Hydra Card:Minorous Card:Skel Woker Card:Desert Wolf Card"; break; - case 39: callsub L_Question,"Which NPC promotes you?",1,"Valkyrie:Val Kiwi:Balp Hiri:Elephant"; break; - case 40: callsub L_Question,"Which catalyst do you need to use the Blaze Shield skill?",2,"Ice Stone:Flame Stone:Wind Stone:Earth Stone"; break; - case 41: callsub L_Question,"Which of the following is not an effect of the Watery Evasion skill?",4,"Movement speed decrease:Waterball availability:Holy Water craftability:VIT decrease"; break; - case 42: callsub L_Question,"Which of the following matches are incorrect for skill and property?",3,"Flaming Petals-Fire:Snow Flake Draft-Water:Freezing Spear-Ground:Lightning Jolt-Wind"; break; - case 43: callsub L_Question,"Which of the following is the best skill to use when attacking a ground property enemy?",2,"First Wind:Exploding Dragon:Snow Flake Draft:Wind Blade"; break; - case 44: callsub L_Question,"Which Ninja Mastery skill level do you need to learn the Exploding Dragon skill?",1,"10:9:8:1"; break; - case 45: callsub L_Question,"What is the attack range when you master Flip Tatami?",3,"5:7:3:1"; break; - case 46: callsub L_Question,"What weapon cannot be made by the blacksmith Khaibara?",4,"Khukri:Murasame:Hakujin:Humma Wing Shuriken"; break; - case 47: callsub L_Question,"Which of the following correctly matches material needed to make a Icicle Kunai?",2,"4 Nimbus Shuriken, 2 Ice Stone:8 Nimbus Shuriken, 2 Ice Stone:2 Nimbus Shuriken, 1 Ice Stone:1 Nimbus Shuriken, 2 Ice Stone"; break; - case 48: callsub L_Question,"Which of the following Kunai will give the most damage to the ground property monster, Porcellio?",1,"Heat Wave Kunai:Icicle Kunai:Fell Poison Kunai:High Wind Kunai"; break; - case 49: callsub L_Question,"Which of the following blacksmiths do not create ninja items?",2,"Khaibara:Aiku:Tetsu:Toshu"; break; - case 50: callsub L_Question,"What is the name of the suspicious man you can meet during the Ninja job change quest?",3,"Red Leopard Jack:Black Leopard Jack:Red Leopard Joe:Black Leopard Joe"; break; - default: - mes "[Cougar]"; - mes "An unknown error has occurred."; - mes "Please contact customer service."; - close; - } - } - mes "[Cougar]"; - mes "You're through all 10 questions. Wasn't so bad! The important part starts now."; - next; - mes "[Cougar]"; - mes "... ... ..."; - next; - if (@job_ko_cougar < 90) { + mes "I remember you from before looking for the way of the ninja."; + next; mes "[Cougar]"; - mes "You fool!!"; - mes "You couldn't even solve these?"; + mes "You've grown this strong already?"; next; mes "[Cougar]"; - mes "Can't believe someone who is taking a new path can be so pathetic."; + mes "Ha ha ha-"; + mes "A truly determined youth! I like that."; next; mes "[Cougar]"; - mes "I'll give you another chance."; - mes "You will take the test again with new questions. Better pass it this time."; - } else { + mes "Good! The test you are about to take is the ^339CCCTest of Knowledge^000000."; + next; mes "[Cougar]"; - mes "Hmm. " + (@job_ko_cougar) + "?"; + mes "I hope you haven't been lazy with your studies while focusing on getting stronger?"; next; + switch(select("Yes", "No")) { + case 1: + setquest 5139; + mes "[Cougar]"; + mes "That's a relief. Let me know when you are ready to start the test."; + close; + case 2: + setquest 5139; + mes "[Cougar]"; + mes "So you were all talk? Well, let me know when you are ready then."; + close; + } + } else if (.@ko_test_01 == 1 && .@ko_test_01_1 == 1) { mes "[Cougar]"; - mes "Well, looks like you weren't lazy with your studies."; + mes "I'm ready at my end. Are you ready for the test?"; next; + if(select("Yes", "No") == 2) { + mes "[Cougar]"; + mes "Well, what can I do but wait for you."; + close; + } mes "[Cougar]"; - mes "What? Proud of yourself for solving these questions?"; + mes "This isn't your first test, is it?"; next; mes "[Cougar]"; - mes "You still have a long way to go and this is only a small fraction of it."; + mes "You only need to choose the correct answer to my questions."; next; mes "[Cougar]"; - mes "Well... I'm curious how far your strong will can take you through other tests."; + mes "Let's start."; next; - completequest 5136; - erasequest 5139; + + set .@questions,10; // number of questions to ask + + // shuffle array an array of questions to be asked + freeloop(1); + setarray .@n[0], + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25, + 26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50; + for (set .@i,getarraysize(.@n)-1; .@i>0; set .@i,.@i-1) { + set .@rand, rand(.@i); + set .@tmp, .@n[.@i]; + set .@n[.@i], .@n[.@rand]; + set .@n[.@rand], .@tmp; + } + deletearray .@n[10],getarraysize(.@n) - .@questions; + freeloop(0); + + set @job_ko_cougar,0; + for (set .@i,1; .@i<=.@questions; set .@i,.@i+1) { + mes "[Cougar]"; + mes (.@i < .@questions)?"Question number "+.@i+":":"Last question:"; + switch (.@n[.@i-1]) { + case 1: callsub L_Question,"What is the DEX + LUK total for a Job Master?",2,"8:10:12:14"; break; + case 2: callsub L_Question,"What is the highest job level for a ninja?",1,"70:50:99:100"; break; + case 3: callsub L_Question,"How many skill points do you need to master the Throw Coins skill?",3,"25:30:35:37"; break; + case 4: callsub L_Question,"Which of the following is the correct number of Evasion and effect duration for Mirror Image level 10?",4,"Up to 7 and 200 seconds:Up to 5 and 220 seconds:Up to 6 and 240 seconds:Up to 5 and 240 seconds"; break; + case 5: callsub L_Question,"How many skill points do you need to master the Cicada Skin Shed?",1,"5:3:1:4"; break; + case 6: callsub L_Question,"If Dagger Throwing Practice is at 7, how much ATK is added to Shuriken attacks?",2,"18:21:27:30"; break; + case 7: callsub L_Question,"What is the basic attack range for Throw Shuriken?",3,"7 blocks:8 blocks:9 blocks:10 blocks"; break; + case 8: callsub L_Question,"What is the maximum moving range of Shadow Leap?",4,"6 blocks:7 blocks:8 blocks:9 blocks"; break; + case 9: callsub L_Question,"How much money is used for Throw Coins level 6?",4,"2000-8000:1000-6000:3000-8000:3000-6000"; break; + case 10: callsub L_Question,"What is the most important aspect of increasing ATK for the Killing Strike skill?",2,"VIT:MAXHP:INT:MAXSP"; break; + case 11: callsub L_Question,"What is not the effect you get after reaching the STR status?",3,"Close range attack increase:Weight limit increase:Magic attack increase:Weapon attack increase"; break; + case 12: callsub L_Question,"What is not the effect you get after reaching the INT status?",4,"MAXSP increase:MATK increase:Magic damage increase:Staff attack increase"; break; + case 13: callsub L_Question,"What is not the effect you get after reaching the DEX status?",2,"Casting time decrease:Evasion increase:Accuracy increase:Long range attack increase"; break; + case 14: callsub L_Question,"What is not the effect you get after reaching the AGI status?",1,"Accuracy increase:Flee increase:Attack speed increase:Delay after attack decrease"; break; + case 15: callsub L_Question,"What is not the effect you get after reaching the VIT status?",4,"Weapon defense increase:MAXHP increase:Magic defense increase:Attack increase"; break; + case 16: callsub L_Question,"What is not the effect you get after reaching the LUK status?",3,"Accuracy increase:Complete evasion increase:Magic damage decrease:Critical rate increase"; break; + case 17: callsub L_Question,"You need to equip a card to your shoes to enhance Killing Strike attack. Which of the following is the appropriate card to equip?",2,"Gold Acidus Card:Matyr Card:Odium of Thantos Card:Eddga Card"; break; + case 18: callsub L_Question,"You need a catalyst to use ninja skills. Which of the following skills does not need a catalyst?",3,"Blaze Shield:Watery Evasion:Flaming Petals:Snow Flake Draft"; break; + case 19: callsub L_Question,"How much does STR/INT go up when Ninja Aura level 5 is used?",2,"4:5:6:7"; break; + case 20: callsub L_Question,"You are hunting the Orc Warrior. Which Kunai would you use? ",1,"Heat Wave Kunai:Icicle Kunai:Fell Poison Kunai:High Wind Kunai"; break; + case 21: callsub L_Question,"Which village is the Ninja Guild located in?",2,"Lutie:Amatsu:Dewata:Comodo"; break; + case 22: callsub L_Question,"How do Ninjas get promoted?",3,"By Val Kiwi:By Randgris:None:By Valkyrie"; break; + case 23: callsub L_Question,"What was next to me when you first met me?",4,"A cushion:A folding screen:A flowerpot:A brazier"; break; + case 24: callsub L_Question,"What is the level of Dagger Throwing Practice you have to reach to learn the Killing Strike skill?",1,"7:5:6:8"; break; + case 25: callsub L_Question,"How many hits does a Throw Kunai give to a monster?",2,"2:3:4:5"; break; + case 26: callsub L_Question,"When your First Wind is at level 4, what will go with the MATK and range?",3,"MATK400, 8 blocks:MATK500, 7 blocks:MATK500, 8 blocks:MATK400, 7 blocks"; break; + case 27: callsub L_Question,"Which of the following skills can't you learn at Dagger Throwing Practice level 7?",4,"Throw Kunai:Throw Huuma Shuriken:Killing Strike:Throw Coins"; break; + case 28: callsub L_Question,"What level do you have to be in Dagger Throwing Practice in order to learn the Throw Coins skill?",4,"4:6:8:10"; break; + case 29: callsub L_Question,"What is the attack range for the Exploding Dragon?",3,"3*3:4*4:5*5:6*6"; break; + case 30: callsub L_Question,"How long is the effect time for the Watery Evasion level 7 skill?",2,"40 seconds:45 seconds:50 seconds:55 seconds"; break; + case 31: callsub L_Question,"What is the attack effect for Haze Slasher level 4?",1,"140%:150%:160%:170%"; break; + case 32: callsub L_Question,"How much power is in the Huuma Blaze Shuriken weapon?",1,"Fireball 5 , DEX-2:Fireball 5 , DEX-3:Fireball 4 , DEX-2:Fireball 4 , DEX-3"; break; + case 33: callsub L_Question,"How much power is in the Murasame weapon?",2,"Human attack 10%:Human critical +10:Demon attack 10%:Demon critical +10"; break; + case 34: callsub L_Question,"What is the maximum hit number for Blaze Shield level 10?",3,"7:8:9:10"; break; + case 35: callsub L_Question,"What is the property of the Lightning Jolt?",4,"Fire:Water:Ground:Wind"; break; + case 36: callsub L_Question,"You are creating a weapon for small monsters. What is the best card to use?",4,"Hydra Card:Minorous Card:Skel Woker Card:Desert Wolf Card"; break; + case 37: callsub L_Question,"You are creating a weapon for mid-sized monsters. What is the best card to use?",3,"Hydra Card:Minorous Card:Skel Woker Card:Desert Wolf Card"; break; + case 38: callsub L_Question,"You are creating a weapon for huge monsters. What is the best card to use?",2,"Hydra Card:Minorous Card:Skel Woker Card:Desert Wolf Card"; break; + case 39: callsub L_Question,"Which NPC promotes you?",1,"Valkyrie:Val Kiwi:Balp Hiri:Elephant"; break; + case 40: callsub L_Question,"Which catalyst do you need to use the Blaze Shield skill?",2,"Ice Stone:Flame Stone:Wind Stone:Earth Stone"; break; + case 41: callsub L_Question,"Which of the following is not an effect of the Watery Evasion skill?",4,"Movement speed decrease:Waterball availability:Holy Water craftability:VIT decrease"; break; + case 42: callsub L_Question,"Which of the following matches are incorrect for skill and property?",3,"Flaming Petals-Fire:Snow Flake Draft-Water:Freezing Spear-Ground:Lightning Jolt-Wind"; break; + case 43: callsub L_Question,"Which of the following is the best skill to use when attacking a ground property enemy?",2,"First Wind:Exploding Dragon:Snow Flake Draft:Wind Blade"; break; + case 44: callsub L_Question,"Which Ninja Mastery skill level do you need to learn the Exploding Dragon skill?",1,"10:9:8:1"; break; + case 45: callsub L_Question,"What is the attack range when you master Flip Tatami?",3,"5:7:3:1"; break; + case 46: callsub L_Question,"What weapon cannot be made by the blacksmith Khaibara?",4,"Khukri:Murasame:Hakujin:Humma Wing Shuriken"; break; + case 47: callsub L_Question,"Which of the following correctly matches material needed to make a Icicle Kunai?",2,"4 Nimbus Shuriken, 2 Ice Stone:8 Nimbus Shuriken, 2 Ice Stone:2 Nimbus Shuriken, 1 Ice Stone:1 Nimbus Shuriken, 2 Ice Stone"; break; + case 48: callsub L_Question,"Which of the following Kunai will give the most damage to the ground property monster, Porcellio?",1,"Heat Wave Kunai:Icicle Kunai:Fell Poison Kunai:High Wind Kunai"; break; + case 49: callsub L_Question,"Which of the following blacksmiths do not create ninja items?",2,"Khaibara:Aiku:Tetsu:Toshu"; break; + case 50: callsub L_Question,"What is the name of the suspicious man you can meet during the Ninja job change quest?",3,"Red Leopard Jack:Black Leopard Jack:Red Leopard Joe:Black Leopard Joe"; break; + default: + mes "[Cougar]"; + mes "An unknown error has occurred."; + mes "Please contact customer service."; + close; + } + } + mes "[Cougar]"; + mes "You're through all 10 questions. Wasn't so bad! The important part starts now."; + next; + mes "[Cougar]"; + mes "... ... ..."; + next; + if (@job_ko_cougar < 90) { + mes "[Cougar]"; + mes "You fool!!"; + mes "You couldn't even solve these?"; + next; + mes "[Cougar]"; + mes "Can't believe someone who is taking a new path can be so pathetic."; + next; + mes "[Cougar]"; + mes "I'll give you another chance."; + mes "You will take the test again with new questions. Better pass it this time."; + } else { + mes "[Cougar]"; + mes "Hmm. " + (@job_ko_cougar) + "?"; + next; + mes "[Cougar]"; + mes "Well, looks like you weren't lazy with your studies."; + next; + mes "[Cougar]"; + mes "What? Proud of yourself for solving these questions?"; + next; + mes "[Cougar]"; + mes "You still have a long way to go and this is only a small fraction of it."; + next; + mes "[Cougar]"; + mes "Well... I'm curious how far your strong will can take you through other tests."; + next; + completequest 5136; + erasequest 5139; + mes "[Cougar]"; + mes "I'll let you go now so go report back to Guide Gion with your results."; + close2; + warp "job_ko",16,113; + end; + } + set @job_ko_cougar,0; + close; + } else if (.@ko_test_01 == 2 && .@ko_test_01_1 == 0) { mes "[Cougar]"; mes "I'll let you go now so go report back to Guide Gion with your results."; close2; warp "job_ko",16,113; end; } - set @job_ko_cougar,0; - close; - } else if (.@ko_test_01 == 2 && .@ko_test_01_1 == 0) { - mes "[Cougar]"; - mes "I'll let you go now so go report back to Guide Gion with your results."; - close2; - warp "job_ko",16,113; - end; - } else { - L_Kick: - mes "[Cougar]"; - mes "How did you get here?"; - next; - mes "[Cougar]"; - mes "It's my duty to get rid of you."; - mes "^000099(He's a short, silent man.)^000000"; - mes "This will push you back!"; - close2; - warp "amatsu",147,136; - end; } + mes "[Cougar]"; + mes "How did you get here?"; + next; + mes "[Cougar]"; + mes "It's my duty to get rid of you."; + mes "^000099(He's a short, silent man.)^000000"; + mes "This will push you back!"; + close2; + warp "amatsu",147,136; end; //callsub L_Question,"<Question>",<correct answer choice>,"<Choice 1>:<Choice 2>:<Choice 3>:<Choice 4>"; diff --git a/npc/re/jobs/3-1/guillotine_cross.txt b/npc/re/jobs/3-1/guillotine_cross.txt index d56aff87d..f70ee321c 100644 --- a/npc/re/jobs/3-1/guillotine_cross.txt +++ b/npc/re/jobs/3-1/guillotine_cross.txt @@ -35,103 +35,110 @@ //========================================================================= que_job01,75,96,3 script Guild Member#3rdgc01 4_M_MOCASS1,{ - if (job_3rd_gc == 0) { - if (Class == Job_Assassin || Class == Job_Assassin_Cross || Class == Job_Baby_Assassin) { - if (BaseLevel >= 99) { - L_Mission: - mes "[Ahcart]"; - mes "Finally, it's time..."; - mes "Hey, what's your name?"; - next; - switch(select(strcharinfo(PC_NAME),".....")) { - case 1: + if (job_3rd_gc == 0 || job_3rd_gc == 1) { + if (job_3rd_gc == 0) { + if (Class == Job_Assassin || Class == Job_Assassin_Cross || Class == Job_Baby_Assassin) { + if (BaseLevel < 99) { mes "[Ahcart]"; - mes strcharinfo(PC_NAME)+"?"; - mes "Got it. I'll remember your name."; - mes "A master told me that you are a person with ability."; - break; - case 2: - mes "[Ahcart]"; - mes "What? You are a distrustful person."; - mes "Hmm, whatever."; - mes "I heard that you are a person with ability."; - break; - } - next; - mes "[Ahcart]"; - mes "My duty is delivering a guild message to a capable assassin."; - mes "I think that you are suitable to perform the guild's duty."; - next; - mes "[Ahcart]"; - mes "So, would you perform this duty for us?"; - mes "Of course, I'm going to offer a reward for completing your task."; - next; - select("What is the request?"); - mes "[Ahcart]"; - mes "It's unclear."; - mes "I told you. It's a special task."; - mes "The only thing I know is the condition to bring a person with the master's ability."; - next; - mes "[Ahcart]"; - mes "First, one who has patience."; - mes "Second, one who is quiet."; - mes "Third, one who is focused."; - next; - mes "[Ahcart]"; - mes "What do you think about what I told you?"; - mes "This task means that it needs a person who can perform a task irrespective of their own will."; - next; - mes "[Ahcart]"; - mes "It's necessary to keep this request secret."; - mes "But it's also your duty not to tell anyone."; - next; - mes "[Ahcart]"; - mes "This is all your choice."; - mes "Will you help us with this request?"; - next; - switch(select("I'll do it.", "Give me time to think.")) { - case 1: - mes "[Ahcart]"; - mes "Ok, to Veins."; - mes "I'll contact them."; - mes "It's your first duty to go to Veins."; + mes "Hmm, you are my peer."; + mes "I'm Ahcart. I'm from Veins."; + mes "Hmm..."; next; mes "[Ahcart]"; - mes "You should be able to find it easily."; - mes "Go now."; - job_3rd_gc = 3; - setquest 7101; - close; - case 2: - mes "[Ahcart]"; - mes "Got it."; - mes "But don't think about it for too long."; - job_3rd_gc = 2; + mes "Of course, a chapter of the assassin guild is not only in Morroc. If you have a chance to go there, visit there."; + mes "I think you might go there."; + job_3rd_gc = 1; close; } + } else { + mes "[A man of a sharp impression]"; + mes "...."; + mes "What the...?"; + mes "You are not an assassin."; + close; } + } else if (job_3rd_gc == 1) { + if (BaseLevel < 99) { + mes "[Ahcart]"; + mes "If you become stronger and more skillful, then the assassin's guild will give you a special task."; + mes "Go for it."; + close; + } + } + mes "[Ahcart]"; + mes "Finally, it's time..."; + mes "Hey, what's your name?"; + next; + switch(select(strcharinfo(PC_NAME),".....")) { + case 1: mes "[Ahcart]"; - mes "Hmm, you are my peer."; - mes "I'm Ahcart. I'm from Veins."; - mes "Hmm..."; + mes strcharinfo(PC_NAME)+"?"; + mes "Got it. I'll remember your name."; + mes "A master told me that you are a person with ability."; + break; + case 2: + mes "[Ahcart]"; + mes "What? You are a distrustful person."; + mes "Hmm, whatever."; + mes "I heard that you are a person with ability."; + break; + } + next; + mes "[Ahcart]"; + mes "My duty is delivering a guild message to a capable assassin."; + mes "I think that you are suitable to perform the guild's duty."; + next; + mes "[Ahcart]"; + mes "So, would you perform this duty for us?"; + mes "Of course, I'm going to offer a reward for completing your task."; + next; + select("What is the request?"); + mes "[Ahcart]"; + mes "It's unclear."; + mes "I told you. It's a special task."; + mes "The only thing I know is the condition to bring a person with the master's ability."; + next; + mes "[Ahcart]"; + mes "First, one who has patience."; + mes "Second, one who is quiet."; + mes "Third, one who is focused."; + next; + mes "[Ahcart]"; + mes "What do you think about what I told you?"; + mes "This task means that it needs a person who can perform a task irrespective of their own will."; + next; + mes "[Ahcart]"; + mes "It's necessary to keep this request secret."; + mes "But it's also your duty not to tell anyone."; + next; + mes "[Ahcart]"; + mes "This is all your choice."; + mes "Will you help us with this request?"; + next; + switch(select("I'll do it.", "Give me time to think.")) { + case 1: + mes "[Ahcart]"; + mes "Ok, to Veins."; + mes "I'll contact them."; + mes "It's your first duty to go to Veins."; next; mes "[Ahcart]"; - mes "Of course, a chapter of the assassin guild is not only in Morroc. If you have a chance to go there, visit there."; - mes "I think you might go there."; - job_3rd_gc = 1; + mes "You should be able to find it easily."; + mes "Go now."; + job_3rd_gc = 3; + setquest 7101; + close; + case 2: + mes "[Ahcart]"; + mes "Got it."; + mes "But don't think about it for too long."; + job_3rd_gc = 2; close; } - mes "[A man of a sharp impression]"; - mes "...."; - mes "What the...?"; - mes "You are not an assassin."; - close; - } else if (job_3rd_gc == 1) { - if (BaseLevel >= 99) goto L_Mission; - mes "[Ahcart]"; - mes "If you become stronger and more skillful, then the assassin's guild will give you a special task."; - mes "Go for it."; - close; + + + + } else if (job_3rd_gc == 2) { mes "[Ahcart]"; mes "Have you thought about it more?"; @@ -3649,85 +3656,87 @@ job3_guil01,148,53,3 script Bercasell#3rdgc16 4_M_GUILLOTINE,{ next; switch(select("Yes, change my job.", "I need to think about it.")) { case 1: - L_JobChange: - mes "[Bercasell]"; - mes "You don't regret it?"; - callsub L_Info; - mes "[Bercasell]"; - mes "You can become a living offensive weapon."; - mes "Do you really want to become a Guillotine Cross?"; - next; - switch(select("Yes, change my job.", "I need to rethink it.")) { - case 1: - mes "[Bercasell]"; - if (hascashmount()) { - mes "I cannot perform the job change."; - mes "Please remove your mount and try again."; - close; - } else if (SkillPoint != 0) { - mes "You still have unspent skill points."; - mes "Please use all your skill points and try again."; - close; - } - mes "Is your decision final?"; - mes "Good."; - next; - mes "[Bercasell]"; - mes "Now, you are an assassin, yet you are not an assassin anymore."; - mes "You are in the shadows, but it's different from the other shadows."; - next; - mes "[Bercasell]"; - mes "Your enemy is everything you can see."; - mes "Don't forget yourself."; - mes "A weight of the blood on your weapons."; - next; - mes "[Bercasell]"; - mes "Ok, change your clothes to your new uniform."; - mes "You are now a Guillotine Cross."; - next; - mes "[Bercasell]"; - mes "A sword of the shadow..."; - setlook 7,0; - jobchange roclass(eaclass()|EAJL_THIRD); - if (questprogress(7096) == 1) { - job_3rd_gc = 25; - erasequest 7096; - } else if (questprogress(7097) == 1) { - job_3rd_gc = 26; - erasequest 7097; - } else if (questprogress(7098) == 1) { - job_3rd_gc = 27; - erasequest 7098; - } else if (questprogress(7099) == 1) { - job_3rd_gc = 28; - erasequest 7099; - } - getitem Green_Apple_Ring,1; - getitem Silent_Executer,1; - next; - mes "[Bercasell]"; - mes "And... these are presents to celebrate your becoming a Guillotine Cross."; - close; - case 2: - mes "[Bercasell]"; - mes "You are prudent. That's a good thing."; - mes "I'll wait for the day that you decide to join us as a Guillotine Cross."; - close; - } + break; case 2: mes "[Bercasell]"; mes "You are prudent. That's a good thing."; mes "I'll wait for the day that you decide to join us as a Guillotine Cross."; close; } + break; } + break; case 2: - goto L_JobChange; + break; case 3: mes "[Bercasell]"; mes "Don't bother me."; close; } + mes "[Bercasell]"; + mes "You don't regret it?"; + callsub L_Info; + mes "[Bercasell]"; + mes "You can become a living offensive weapon."; + mes "Do you really want to become a Guillotine Cross?"; + next; + switch(select("Yes, change my job.", "I need to rethink it.")) { + case 1: + mes "[Bercasell]"; + if (hascashmount()) { + mes "I cannot perform the job change."; + mes "Please remove your mount and try again."; + close; + } else if (SkillPoint != 0) { + mes "You still have unspent skill points."; + mes "Please use all your skill points and try again."; + close; + } + mes "Is your decision final?"; + mes "Good."; + next; + mes "[Bercasell]"; + mes "Now, you are an assassin, yet you are not an assassin anymore."; + mes "You are in the shadows, but it's different from the other shadows."; + next; + mes "[Bercasell]"; + mes "Your enemy is everything you can see."; + mes "Don't forget yourself."; + mes "A weight of the blood on your weapons."; + next; + mes "[Bercasell]"; + mes "Ok, change your clothes to your new uniform."; + mes "You are now a Guillotine Cross."; + next; + mes "[Bercasell]"; + mes "A sword of the shadow..."; + setlook 7,0; + jobchange roclass(eaclass()|EAJL_THIRD); + if (questprogress(7096) == 1) { + job_3rd_gc = 25; + erasequest 7096; + } else if (questprogress(7097) == 1) { + job_3rd_gc = 26; + erasequest 7097; + } else if (questprogress(7098) == 1) { + job_3rd_gc = 27; + erasequest 7098; + } else if (questprogress(7099) == 1) { + job_3rd_gc = 28; + erasequest 7099; + } + getitem Green_Apple_Ring,1; + getitem Silent_Executer,1; + next; + mes "[Bercasell]"; + mes "And... these are presents to celebrate your becoming a Guillotine Cross."; + close; + case 2: + mes "[Bercasell]"; + mes "You are prudent. That's a good thing."; + mes "I'll wait for the day that you decide to join us as a Guillotine Cross."; + close; + } } mes "......"; mes "What can I do for you?"; diff --git a/npc/re/quests/eden/eden_tutorial.txt b/npc/re/quests/eden/eden_tutorial.txt index e9fac253b..45d7c6f1e 100644 --- a/npc/re/quests/eden/eden_tutorial.txt +++ b/npc/re/quests/eden/eden_tutorial.txt @@ -35,8 +35,129 @@ moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{ if (Class == Job_Novice) { // Fall through - } else if (!questprogress(9167)) { - OnStartQuest: + } else if (!questprogress(9167) || questprogress(9173) == 1) { + if (questprogress(9173) == 1) { + mes "[Tutorial Instructor]"; + mes "Do you have any questions?"; + next; + switch(select("Can I do the same quest again?", "About the Quest Window...", "About ENCHANT...", "About Searching Vends...", "About Mercenary and Pets...", "End Conversation.")) { + case 1: + if (questprogress(9173,PLAYTIME) == 1) { + mes "[Tutorial Instructor]"; + mes "The one method to do the same quests repeatdedly is to do the ^006400Daily Quests^000000."; + next; + mes "[Tutorial Instructor]"; + mes "Once you complete a ^006400Daily Quest^000000 and turn it in, wait about a day then come back to get the request and do it all over again!"; + mes "[Tutorial Instructor]"; + mes "If you received a daily quest, look at bottom right of the ^006400Quest Window^000000. There is a section that is called ^006400LIMITED^000000. In that section, it'll tell you how much time needs to pass before you can pick up another daily quest."; + next; + mes "[Tutorial Instructor]"; + mes "It seems you still have some time left to wait out after finishing my quest. Wait it out a bit more, then come find me and you can get the same quest again."; + close; + } + mes "[Tutorial Instructor]"; + mes "It seems that about a day has passed since you've finished my quest. Alright, so like the ^006400Daily Quests^000000, you can get a quest from me. Did you want to proceed?"; + next; + switch(select("Yes", "No")) { + case 1: + @tutorial_restart = 1; + break; + case 2: + mes "[Tutorial Instructor]"; + mes "Okay. But if you change your mind and want to receive a quest, come find me."; + close; + } + break; + case 2: + mes "[Tutorial Instructor]"; + mes "They say that the ^006400Quest Window^000000 details out everything you need to know about your quests."; + next; + mes "[Tutorial Instructor]"; + mes "If you look at the top left"; + mes "in the area with the information,"; + mes "it says ^006400QUEST^000000"; + mes "and if you click that"; + mes "it'll show all information"; + mes "that pertains to the request."; + next; + mes "[Tutorial Instructor]"; + mes "Using the ^006400Quest Window^000000 will make your life easier. It'll tell you where to go, what items to get or who to find and etc."; + close; + case 3: + mes "[Tutorial Instructor]"; + mes "006400ENCHANT^000000, in general, is divided into two parts: ^006400SOCKET ENCHANT^000000 and ^006400HIDDEN SOCKET ENCHANT^000000."; + next; + mes "[Tutorial Instructor]"; + mes "^006400SOCKET ENCHANT^000000 is used to add a SOCKET into equipments and ^006400HIDDEN SOCKET ENCHANT^000000 is used to put in stats into a socket of an armor."; + next; + mes "[Tutorial Instructor]"; + mes "Of course, in order to do this we are in need of some materials and there is a chance that it may fail, but that's the risk you're taking."; + next; + mes "[Tutorial Instructor]"; + mes "The people who do the ^006400SOCKET ENCHANT^000000 can be found in ^8B4513Prontera, Morroc, Payon,^000000. ^8B4513Rhitalzen^000000 is in the Refinery and ^0000FFSeiyablem^000000 and ^0000FFReiablem^000000 can be found near the entrance."; + next; + mes "[Tutorial Instructor]"; + mes "The one who does ^006400HIDDEN SOCKET ENCHANT^000000 is found at the 6 o'clock location of ^8B4513Prontera^000000. Look for the ^0000FFCraftman Apprentice^000000."; + next; + mes "[Tutorial Instructor]"; + mes "Do you think you understand a little bit more about ^006400ENCHANT^000000?"; + close; + case 4: + mes "[Tutorial Instructor]"; + mes "^006400Vend Search^000000 can be utilized by the ^006400Universal Silver Catalog^000000 item. Since you search through as vends on that map, it'll make it easier for you to find the item that you're looking for."; + next; + mes "[Tutorial Instructor]"; + mes "The ^006400Universal Silver Catalog^000000"; + mes "can be obtained from "; + mes "the ^0000FFCatalogue Wizard^000000"; + mes "that is located in South Prontera;"; + next; + mes "[Tutorial Instructor]"; + mes "It only costs 200 zeny for one"; + mes "of these and with it you can"; + mes "search up to 10 times."; + mes "You can say that it's a necessity."; + next; + mes "[Tutorial Instructor]"; + mes "So, are you getting familiar with ^006400Vend Search^000000? Don't just stand there and listen to me. Go ahead and try it for yourself!"; + close; + case 5: + mes "[Tutorial Instructor]"; + mes "Depending on what you need, ^006400Mercenary^000000 and ^006400Pet^000000 can be used in various ways."; + next; + mes "[Tutorial Instructor]"; + mes "If a 006400Mercenary^000000 gives you direct effect"; + mes "by fighting for you"; + mes "then a ^006400Pet^000000 helps you indirectly with their"; + mes "abilities and varied appearances,"; + mes "and it captures your heart."; + next; + mes "[Tutorial Instructor]"; + mes "In order to employ a Mercenary"; + mes "Go find the ^006400Mercenary Guild^000000"; + mes "which is by the front door of ^8B4513Prontera^000000."; + mes "Go to the ^006400Information Agent^000000"; + mes "and ask them where the ^006400Mercenary Guild Official^000000"; + mes "is located and they will let you know."; + next; + mes "[Tutorial Instructor]"; + mes "In order to get a ^006400Pet^000000, while hunting you will obtain taming items. Use the tame on the monster it's for and you can get a pet."; + next; + mes "[Tutorial Instructor]"; + mes "Because there is a chance for failure, please use the taming item with great care."; + next; + mes "[Tutorial Instructor]"; + mes "That aside... you can get a ^006400Mercenary^000000 from the Mercenary Guild and you can get a ^006400Pet^000000 by trading or buying it from another player."; + next; + mes "[Tutorial Instructor]"; + mes "Now, do you understand a bit more about using a ^006400Mercenary^000000 and a ^006400Pet^000000? I hope you get a chance to use them in the future."; + close; + case 6: + mes "[Tutorial Instructor]"; + mes "If you have any questions, come find me again."; + close; + } + } if (@tutorial_restart) { .@tutorial_restart = 1; @tutorial_restart = 0; @@ -459,126 +580,6 @@ moc_para01,34,178,3 script Tutorial Instructor 4_M_KHMAN,{ mes "then bring them back to me."; close; } - } else if (questprogress(9173) == 1) { - mes "[Tutorial Instructor]"; - mes "Do you have any questions?"; - next; - switch(select("Can I do the same quest again?", "About the Quest Window...", "About ENCHANT...", "About Searching Vends...", "About Mercenary and Pets...", "End Conversation.")) { - case 1: - if (questprogress(9173,PLAYTIME) == 1) { - mes "[Tutorial Instructor]"; - mes "The one method to do the same quests repeatdedly is to do the ^006400Daily Quests^000000."; - next; - mes "[Tutorial Instructor]"; - mes "Once you complete a ^006400Daily Quest^000000 and turn it in, wait about a day then come back to get the request and do it all over again!"; - mes "[Tutorial Instructor]"; - mes "If you received a daily quest, look at bottom right of the ^006400Quest Window^000000. There is a section that is called ^006400LIMITED^000000. In that section, it'll tell you how much time needs to pass before you can pick up another daily quest."; - next; - mes "[Tutorial Instructor]"; - mes "It seems you still have some time left to wait out after finishing my quest. Wait it out a bit more, then come find me and you can get the same quest again."; - close; - } - mes "[Tutorial Instructor]"; - mes "It seems that about a day has passed since you've finished my quest. Alright, so like the ^006400Daily Quests^000000, you can get a quest from me. Did you want to proceed?"; - next; - switch(select("Yes", "No")) { - case 1: - @tutorial_restart = 1; - goto OnStartQuest; - case 2: - mes "[Tutorial Instructor]"; - mes "Okay. But if you change your mind and want to receive a quest, come find me."; - close; - } - case 2: - mes "[Tutorial Instructor]"; - mes "They say that the ^006400Quest Window^000000 details out everything you need to know about your quests."; - next; - mes "[Tutorial Instructor]"; - mes "If you look at the top left"; - mes "in the area with the information,"; - mes "it says ^006400QUEST^000000"; - mes "and if you click that"; - mes "it'll show all information"; - mes "that pertains to the request."; - next; - mes "[Tutorial Instructor]"; - mes "Using the ^006400Quest Window^000000 will make your life easier. It'll tell you where to go, what items to get or who to find and etc."; - close; - case 3: - mes "[Tutorial Instructor]"; - mes "006400ENCHANT^000000, in general, is divided into two parts: ^006400SOCKET ENCHANT^000000 and ^006400HIDDEN SOCKET ENCHANT^000000."; - next; - mes "[Tutorial Instructor]"; - mes "^006400SOCKET ENCHANT^000000 is used to add a SOCKET into equipments and ^006400HIDDEN SOCKET ENCHANT^000000 is used to put in stats into a socket of an armor."; - next; - mes "[Tutorial Instructor]"; - mes "Of course, in order to do this we are in need of some materials and there is a chance that it may fail, but that's the risk you're taking."; - next; - mes "[Tutorial Instructor]"; - mes "The people who do the ^006400SOCKET ENCHANT^000000 can be found in ^8B4513Prontera, Morroc, Payon,^000000. ^8B4513Rhitalzen^000000 is in the Refinery and ^0000FFSeiyablem^000000 and ^0000FFReiablem^000000 can be found near the entrance."; - next; - mes "[Tutorial Instructor]"; - mes "The one who does ^006400HIDDEN SOCKET ENCHANT^000000 is found at the 6 o'clock location of ^8B4513Prontera^000000. Look for the ^0000FFCraftman Apprentice^000000."; - next; - mes "[Tutorial Instructor]"; - mes "Do you think you understand a little bit more about ^006400ENCHANT^000000?"; - close; - case 4: - mes "[Tutorial Instructor]"; - mes "^006400Vend Search^000000 can be utilized by the ^006400Universal Silver Catalog^000000 item. Since you search through as vends on that map, it'll make it easier for you to find the item that you're looking for."; - next; - mes "[Tutorial Instructor]"; - mes "The ^006400Universal Silver Catalog^000000"; - mes "can be obtained from "; - mes "the ^0000FFCatalogue Wizard^000000"; - mes "that is located in South Prontera;"; - next; - mes "[Tutorial Instructor]"; - mes "It only costs 200 zeny for one"; - mes "of these and with it you can"; - mes "search up to 10 times."; - mes "You can say that it's a necessity."; - next; - mes "[Tutorial Instructor]"; - mes "So, are you getting familiar with ^006400Vend Search^000000? Don't just stand there and listen to me. Go ahead and try it for yourself!"; - close; - case 5: - mes "[Tutorial Instructor]"; - mes "Depending on what you need, ^006400Mercenary^000000 and ^006400Pet^000000 can be used in various ways."; - next; - mes "[Tutorial Instructor]"; - mes "If a 006400Mercenary^000000 gives you direct effect"; - mes "by fighting for you"; - mes "then a ^006400Pet^000000 helps you indirectly with their"; - mes "abilities and varied appearances,"; - mes "and it captures your heart."; - next; - mes "[Tutorial Instructor]"; - mes "In order to employ a Mercenary"; - mes "Go find the ^006400Mercenary Guild^000000"; - mes "which is by the front door of ^8B4513Prontera^000000."; - mes "Go to the ^006400Information Agent^000000"; - mes "and ask them where the ^006400Mercenary Guild Official^000000"; - mes "is located and they will let you know."; - next; - mes "[Tutorial Instructor]"; - mes "In order to get a ^006400Pet^000000, while hunting you will obtain taming items. Use the tame on the monster it's for and you can get a pet."; - next; - mes "[Tutorial Instructor]"; - mes "Because there is a chance for failure, please use the taming item with great care."; - next; - mes "[Tutorial Instructor]"; - mes "That aside... you can get a ^006400Mercenary^000000 from the Mercenary Guild and you can get a ^006400Pet^000000 by trading or buying it from another player."; - next; - mes "[Tutorial Instructor]"; - mes "Now, do you understand a bit more about using a ^006400Mercenary^000000 and a ^006400Pet^000000? I hope you get a chance to use them in the future."; - close; - case 6: - mes "[Tutorial Instructor]"; - mes "If you have any questions, come find me again."; - close; - } } mes "[Tutorial Instructor]"; mes "Lately, it has been said that"; diff --git a/npc/re/quests/quests_malangdo.txt b/npc/re/quests/quests_malangdo.txt index 1351ab80a..9a67c4af8 100644 --- a/npc/re/quests/quests_malangdo.txt +++ b/npc/re/quests/quests_malangdo.txt @@ -1174,10 +1174,49 @@ mal_in02,140,94,0 script Bob#mal 4_CAT_DOWN,{ } else if (ma_tomas == 14) { // Dialogue in repeatable quest is identical. // Uses a variable to determine the quest mode. - @mal_bob_q = 1; - L_Quest1: - .@i = @mal_bob_q; - @mal_bob_q = 0; + .@i = 1; + } else if (ma_tomas == 15) { + .@i = 3; + } else if (ma_tomas == 16) { + mes "[Bob]"; + mes "Khhh~~~~~~~~~~~~~~~~~~~~~~"; + mes "That was perfect!"; + emotion e_no1; + next; + mes "[Bob]"; + mes "The adhesive filled in just right!!"; + mes "The perfect stapler job!!"; + mes "The speechless and marvelous finishing skill!!"; + next; + mes "[Bob]"; + mes "Impressed!"; + mes "Mysterious!"; + mes "Shocked!"; + emotion e_omg; + next; + mes "[Bob]"; + mes "You did a great job indeed!!!"; + mes "I will tell Dr. Mali!"; + if (countitem(Fix_Kit) > 0) + delitem Fix_Kit,1; + ma_tomas = 17; + changequest 11223,11224; + close; + } else if (ma_tomas > 99) { + if (questprogress(11240)) + .@i = 2; + else if (questprogress(11241)) + .@i = 3; + } else { + mes "[Bob]"; + mes "You bow-wow! bow! wow! I mew! mew! mew!"; + mes "I'm into juice from delicious fish, mew~"; + emotion e_ho; + close; + } + switch (.@i) { + case 1: + case 2: mes "[Bob]"; mes "You bow-wow! bow! wow! I mew! mew! mew!"; mes "I'm into juice from delicious fish, mew~"; @@ -1251,8 +1290,7 @@ mal_in02,140,94,0 script Bob#mal 4_CAT_DOWN,{ emotion e_otl; close; } - } else if (ma_tomas == 15) { - L_Quest2: + case 3: if (checkweight(Knife,1) == 0) { mes " - Notice !! -"; mes " - Since you have too many items - "; @@ -1283,43 +1321,7 @@ mal_in02,140,94,0 script Bob#mal 4_CAT_DOWN,{ mes "Ah, right..."; mes "^0000ffYou may fall into the gap of the crack, unfortunately, so please watch out.^000000"; close; - } else if (ma_tomas == 16) { - mes "[Bob]"; - mes "Khhh~~~~~~~~~~~~~~~~~~~~~~"; - mes "That was perfect!"; - emotion e_no1; - next; - mes "[Bob]"; - mes "The adhesive filled in just right!!"; - mes "The perfect stapler job!!"; - mes "The speechless and marvelous finishing skill!!"; - next; - mes "[Bob]"; - mes "Impressed!"; - mes "Mysterious!"; - mes "Shocked!"; - emotion e_omg; - next; - mes "[Bob]"; - mes "You did a great job indeed!!!"; - mes "I will tell Dr. Mali!"; - if (countitem(Fix_Kit) > 0) - delitem Fix_Kit,1; - ma_tomas = 17; - changequest 11223,11224; - close; - } else if (ma_tomas > 99) { - if (questprogress(11240)) { - @mal_bob_q = 2; - goto L_Quest1; - } else if (questprogress(11241)) - goto L_Quest2; - } - mes "[Bob]"; - mes "You bow-wow! bow! wow! I mew! mew! mew!"; - mes "I'm into juice from delicious fish, mew~"; - emotion e_ho; - close; + } } - script Crack#mal0 FAKE_NPC,{ @@ -2221,38 +2223,7 @@ mal_dun01,136,122,3 script Biscuit#mal 4_ASTER,{ } else if (ma_tomas == 26) { // Dialogue in repeatable quest is identical. // Uses a variable to determine the quest mode. - @mal_bob_q = 1; - L_Quest: - .@i = @mal_bob_q; - @mal_bob_q = 0; - if (countitem(Delicious_Jelly) < 30) { - mes "[Biscuit]"; - mes "It's not enough at all~"; - mes "I need at least 30 Delicious Jelly."; - close; - } - mes "[Biscuit]"; - mes "You got them well."; - mes "There won't be any problem to prepare her meal."; - delitem Delicious_Jelly,30; - if (.@i == 1) { - ma_tomas = 27; - changequest 11231,11232; - } else { - erasequest 11244; - setquest 11245; - getitem Egrade_Coin,5; - } - next; - mes "[Biscuit]"; - mes "Though the jelly looks strange, it tastes good..."; - mes "Star Candy seems to like it a lot as well."; - next; - mes "[Biscuit]"; - mes "Have your meal, Star Candy~"; - mes "Uhhh, why don't you eat it?"; - mes "You have no appetite?"; - close; + .@i = 1; } else if (ma_tomas == 27) { mes "[Biscuit]"; mes "Hooo.. it's natural that you have no appetite..."; @@ -2403,8 +2374,7 @@ mal_dun01,136,122,3 script Biscuit#mal 4_ASTER,{ close; } else if (ma_tomas > 99) { if (questprogress(11244)) { - @mal_bob_q = 2; - goto L_Quest; + .@i = 2; } else if (questprogress(11245,PLAYTIME) == 1) { mes "[Biscuit]"; mes "I'll call you when I need you, so don't worry!"; @@ -2430,10 +2400,39 @@ mal_dun01,136,122,3 script Biscuit#mal 4_ASTER,{ close; } } + } else { + mes "[Biscuit]"; + mes "Star Candy is really good."; + mes "She never loses her smile, even though it's so hard to stand..."; + close; + } + if (countitem(Delicious_Jelly) < 30) { + mes "[Biscuit]"; + mes "It's not enough at all~"; + mes "I need at least 30 Delicious Jelly."; + close; } mes "[Biscuit]"; - mes "Star Candy is really good."; - mes "She never loses her smile, even though it's so hard to stand..."; + mes "You got them well."; + mes "There won't be any problem to prepare her meal."; + delitem Delicious_Jelly,30; + if (.@i == 1) { + ma_tomas = 27; + changequest 11231,11232; + } else { + erasequest 11244; + setquest 11245; + getitem Egrade_Coin,5; + } + next; + mes "[Biscuit]"; + mes "Though the jelly looks strange, it tastes good..."; + mes "Star Candy seems to like it a lot as well."; + next; + mes "[Biscuit]"; + mes "Have your meal, Star Candy~"; + mes "Uhhh, why don't you eat it?"; + mes "You have no appetite?"; close; } diff --git a/npc/re/quests/quests_malaya.txt b/npc/re/quests/quests_malaya.txt index 410ee71a7..8c47fb2ed 100644 --- a/npc/re/quests/quests_malaya.txt +++ b/npc/re/quests/quests_malaya.txt @@ -2426,67 +2426,64 @@ malaya,326,68,2 script Pedro the Sailor 4W_SAILOR,{ end; } else if (.@playtime == 2) { erasequest 7401; - goto L_SetQuest; } else { if (!questprogress(7403)) { - if (!questprogress(7402)) { - goto L_SetQuest; + if (questprogress(7402)) { + mes "[Pedro the Sailor]"; + mes "You know what to do."; + mes "Gather the flowers and take it to Mumbaki to get an Offering Bouquet made."; + next; + mes "[Pedro the Sailor]"; + mes "Give the Bouquet to Miss Diwata to cheer her up."; + mes "....Thank you."; + close; } + } else { mes "[Pedro the Sailor]"; - mes "You know what to do."; - mes "Gather the flowers and take it to Mumbaki to get an Offering Bouquet made."; + mes "Diwata is calm!"; + mes "I can even feel the difference out here."; + mes "I am always in your debt."; next; mes "[Pedro the Sailor]"; - mes "Give the Bouquet to Miss Diwata to cheer her up."; - mes "....Thank you."; + mes "You know what? Why don't you do this on a more regular basis?"; + mes "I think you kind of like doing it."; + setquest 7401; + erasequest 7403; +// if (IsPremiumPcCafe == 10) + getitem Lesser_Agimat, 2; // Lesser_Agimat +// else +// getitem Lesser_Agimat, 1; // Lesser_Agimat + getexp 200000,200000; + if (!rand(3)) + $malayaNames$[0] = strcharinfo(PC_NAME); close; } + } + mes "[Pedro the Sailor]"; + mes "Ah, the thing is..."; + mes "We can't go right now.."; + mes "You see, the ghosts are back..."; + mes "I'm fed up with nuisance."; + next; + mes "[Pedro the Sailor]"; + mes "I mean... Miss Diwata... Isn't feeling very well and, even with the Spiritual Protection"; + mes "a normal person can't stand it."; + next; + if (select("I see. Take care then.", "How about a Floral Tribute?") == 1) { mes "[Pedro the Sailor]"; - mes "Diwata is calm!"; - mes "I can even feel the difference out here."; - mes "I am always in your debt."; - next; - mes "[Pedro the Sailor]"; - mes "You know what? Why don't you do this on a more regular basis?"; - mes "I think you kind of like doing it."; - setquest 7401; - erasequest 7403; -// if (IsPremiumPcCafe == 10) - getitem Lesser_Agimat, 2; // Lesser_Agimat -// else -// getitem Lesser_Agimat, 1; // Lesser_Agimat - getexp 200000,200000; - if (!rand(3)) - $malayaNames$[0] = strcharinfo(PC_NAME); + mes "I'm glad you understand."; + mes "Sigh..."; close; } + mes "[Pedro the Sailor]"; + mes "Hmmm. That would be nice."; + mes "If she can be soothed with flowers...!"; + mes "Good luck."; + setquest 7402; + close; } } end; - -L_SetQuest: - mes "[Pedro the Sailor]"; - mes "Ah, the thing is..."; - mes "We can't go right now.."; - mes "You see, the ghosts are back..."; - mes "I'm fed up with nuisance."; - next; - mes "[Pedro the Sailor]"; - mes "I mean... Miss Diwata... Isn't feeling very well and, even with the Spiritual Protection"; - mes "a normal person can't stand it."; - next; - if (select("I see. Take care then.", "How about a Floral Tribute?") == 1) { - mes "[Pedro the Sailor]"; - mes "I'm glad you understand."; - mes "Sigh..."; - close; - } - mes "[Pedro the Sailor]"; - mes "Hmmm. That would be nice."; - mes "If she can be soothed with flowers...!"; - mes "Good luck."; - setquest 7402; - close; } ma_in01,125,107,3 script Ghost Diwata G_SKOGUL,4,4,{ diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql index 774dacb5d..4ff49624c 100644 --- a/sql-files/item_db.sql +++ b/sql-files/item_db.sql @@ -167,8 +167,8 @@ REPLACE INTO `item_db` VALUES ('601','Wing_Of_Fly','Fly Wing','11','60','30','50 REPLACE INTO `item_db` VALUES ('602','Wing_Of_Butterfly','Butterfly Wing','11','300','150','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill AL_TELEPORT,3;','',''); REPLACE INTO `item_db` VALUES ('603','Old_Blue_Box','Old Blue Box','2','10000','5000','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 603,1;','',''); REPLACE INTO `item_db` VALUES ('604','Branch_Of_Dead_Tree','Dead Branch','2','50','25','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','monster \"this\",-1,-1,\"--ja--\",-1,1,\"\";','',''); -REPLACE INTO `item_db` VALUES ('605','Anodyne','Anodyne','11','2000','1000','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill SM_ENDURE,1;','',''); -REPLACE INTO `item_db` VALUES ('606','Aloebera','Aloevera','11','1500','750','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill SM_SELFPROVOKE,1;','',''); +REPLACE INTO `item_db` VALUES ('605','Anodyne','Anodyne','11','2000','1000','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill SM_ENDURE,1;','',''); +REPLACE INTO `item_db` VALUES ('606','Aloebera','Aloevera','11','1500','750','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill SM_SELFPROVOKE,1;','',''); REPLACE INTO `item_db` VALUES ('607','Yggdrasilberry','Yggdrasil Berry','0','5000','2500','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 100,100;','',''); REPLACE INTO `item_db` VALUES ('608','Seed_Of_Yggdrasil','Yggdrasil Seed','0','5000','2500','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 50,50;','',''); REPLACE INTO `item_db` VALUES ('609','Amulet','Amulet','2','100','50','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); @@ -4937,28 +4937,28 @@ REPLACE INTO `item_db` VALUES ('12713','Monster_Extract','Monster Extract','2',' REPLACE INTO `item_db` VALUES ('12714','Easter_Scroll','Easter Scroll','2','1','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','467',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 12714,1;','',''); REPLACE INTO `item_db` VALUES ('12715','Black_Treasure_Box','Black Treasure Box','2','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12716','Indian_Rice_Cake','Indian Rice Cake','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12717','Poison_Paralysis','Paralyze','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_PARALYSE,300000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12718','Poison_Leech','Leech End','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_LEECHESEND,300000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12719','Poison_Oblivion','Oblivion Curse','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_OBLIVIONCURSE,300000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12720','Poison_Contamination','Disheart','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_DEATHHURT,300000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12721','Poison_Numb','Toxin','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_TOXIN,300000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12722','Poison_Fever','Pyrexia','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_PYREXIA,300000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12723','Poison_Laughing','Magic Mushroom','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_MAGICMUSHROOM,300000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12724','Poison_Fatigue','Venom Bleed','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_VENOMBLEED,15000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12725','Runstone_Nosiege','Nauthiz Rune','11','100','50','100','0','0','0','0','0','18446744073709551615','8','2','0','0','0',NULL,'0','1','0','0','0','0','120000','475',NULL,'1',NULL,'20','1','0','itemskill RK_REFRESH,1;','',''); -REPLACE INTO `item_db` VALUES ('12726','Runstone_Rhydo','Raido Rune','11','100','50','100','0','0','0','0','0','18446744073709551615','8','2','0','0','0',NULL,'0','1','0','0','0','0','30000','475',NULL,'1',NULL,'20','1','0','itemskill RK_CRUSHSTRIKE,1;','',''); -REPLACE INTO `item_db` VALUES ('12727','Runstone_Verkana','Berkana Rune','11','100','50','100','0','0','0','0','0','18446744073709551615','8','2','0','0','0',NULL,'0','1','0','0','0','0','60000','475',NULL,'1',NULL,'20','1','0','itemskill RK_MILLENNIUMSHIELD,1;','',''); -REPLACE INTO `item_db` VALUES ('12728','Runstone_Isia','Isa Rune','11','100','50','100','0','0','0','0','0','18446744073709551615','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_VITALITYACTIVATION,1;','',''); -REPLACE INTO `item_db` VALUES ('12729','Runstone_Asir','Othila Rune','11','100','50','100','0','0','0','0','0','18446744073709551615','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_FIGHTINGSPIRIT,1;','',''); -REPLACE INTO `item_db` VALUES ('12730','Runstone_Urj','Uruz Rune','11','100','50','100','0','0','0','0','0','18446744073709551615','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_ABUNDANCE,1;','',''); -REPLACE INTO `item_db` VALUES ('12731','Runstone_Turisus','Thurisaz Rune','11','100','50','100','0','0','0','0','0','18446744073709551615','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_GIANTGROWTH,1;','',''); -REPLACE INTO `item_db` VALUES ('12732','Runstone_Pertz','Wyrd Rune','11','100','50','100','0','0','0','0','0','18446744073709551615','8','2','0','0','0',NULL,'0','1','0','0','0','0','1000','475',NULL,'1',NULL,'20','1','0','itemskill RK_STORMBLAST,1;','',''); -REPLACE INTO `item_db` VALUES ('12733','Runstone_Hagalas','Hagalaz Rune','11','100','50','100','0','0','0','0','0','18446744073709551615','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_STONEHARDSKIN,1;','',''); -REPLACE INTO `item_db` VALUES ('12734','Runstone_Quality','Luxurious Rune','0','2','1','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 5;','',''); -REPLACE INTO `item_db` VALUES ('12735','Runstone_Ancient','Ancient Rune','0','2','1','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 11;','',''); -REPLACE INTO `item_db` VALUES ('12736','Runstone_Mystic','Mystic Rune','0','2','1','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 14;','',''); -REPLACE INTO `item_db` VALUES ('12737','Runstone_Ordinary','General Rune','0','2','1','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 2;','',''); -REPLACE INTO `item_db` VALUES ('12738','Runstone_Rare','Rare Rune','0','2','1','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 8;','',''); +REPLACE INTO `item_db` VALUES ('12717','Poison_Paralysis','Paralyze','0','2','1','20','0','0','0','0','0','4096','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_PARALYSE, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12718','Poison_Leech','Leech End','0','2','1','20','0','0','0','0','0','4096','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_LEECHESEND, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12719','Poison_Oblivion','Oblivion Curse','0','2','1','20','0','0','0','0','0','4096','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_OBLIVIONCURSE, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12720','Poison_Contamination','Disheart','0','2','1','20','0','0','0','0','0','4096','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_DEATHHURT, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12721','Poison_Numb','Toxin','0','2','1','20','0','0','0','0','0','4096','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_TOXIN, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12722','Poison_Fever','Pyrexia','0','2','1','20','0','0','0','0','0','4096','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_PYREXIA, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12723','Poison_Laughing','Magic Mushroom','0','2','1','20','0','0','0','0','0','4096','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_MAGICMUSHROOM, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12724','Poison_Fatigue','Venom Bleed','0','2','1','20','0','0','0','0','0','4096','8','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_VENOMBLEED, 15000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12725','Runstone_Nosiege','Nauthiz Rune','11','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','120000','475',NULL,'1',NULL,'20','1','0','itemskill RK_REFRESH, 1;','',''); +REPLACE INTO `item_db` VALUES ('12726','Runstone_Rhydo','Raido Rune','11','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','30000','475',NULL,'1',NULL,'20','1','0','itemskill RK_CRUSHSTRIKE, 1;','',''); +REPLACE INTO `item_db` VALUES ('12727','Runstone_Verkana','Berkana Rune','11','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','60000','475',NULL,'1',NULL,'20','1','0','itemskill RK_MILLENNIUMSHIELD, 1;','',''); +REPLACE INTO `item_db` VALUES ('12728','Runstone_Isia','Isa Rune','11','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_VITALITYACTIVATION, 1;','',''); +REPLACE INTO `item_db` VALUES ('12729','Runstone_Asir','Othila Rune','11','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_FIGHTINGSPIRIT, 1;','',''); +REPLACE INTO `item_db` VALUES ('12730','Runstone_Urj','Uruz Rune','11','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_ABUNDANCE, 1;','',''); +REPLACE INTO `item_db` VALUES ('12731','Runstone_Turisus','Thurisaz Rune','11','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_GIANTGROWTH, 1;','',''); +REPLACE INTO `item_db` VALUES ('12732','Runstone_Pertz','Wyrd Rune','11','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','1000','475',NULL,'1',NULL,'20','1','0','itemskill RK_STORMBLAST, 1;','',''); +REPLACE INTO `item_db` VALUES ('12733','Runstone_Hagalas','Hagalaz Rune','11','100','50','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_STONEHARDSKIN, 1;','',''); +REPLACE INTO `item_db` VALUES ('12734','Runstone_Quality','Luxurious Rune','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 5;','',''); +REPLACE INTO `item_db` VALUES ('12735','Runstone_Ancient','Ancient Rune','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 11;','',''); +REPLACE INTO `item_db` VALUES ('12736','Runstone_Mystic','Mystic Rune','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 14;','',''); +REPLACE INTO `item_db` VALUES ('12737','Runstone_Ordinary','General Rune','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 2;','',''); +REPLACE INTO `item_db` VALUES ('12738','Runstone_Rare','Rare Rune','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 8;','',''); REPLACE INTO `item_db` VALUES ('12739','Snow_Flower','Snow Flowers','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 10,10;','',''); REPLACE INTO `item_db` VALUES ('12740','Inc_Str_Scroll','Amplification Scroll','2','1','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','73',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_POTION_BERSERK; sc_start SC_STR_SCROLL, 60000, 20;','',''); REPLACE INTO `item_db` VALUES ('12741','Inc_Int_Scroll','Intellect Amplification Scroll','2','1','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','73',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_SPELLBREAKER; sc_start SC_INT_SCROLL, 60000, 20;','',''); @@ -6228,6 +6228,6 @@ REPLACE INTO `item_db` VALUES ('19504','T_Sunglasses','T Sunglasses','5','0','0' REPLACE INTO `item_db` VALUES ('19505','T_Cigarette','T Cigarette','5','0','0','0','0','0','0','0','0','18446744073709551615','63','2','4096','0','0',NULL,'0','0','54','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('19506','T_Valkyrie_Feather_Band','T Valkyrie Feather Band','5','0','0','0','0','0','0','0','0','18446744073709551615','63','2','1024','0','0',NULL,'1','0','300','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('19507','Fine_Sun','Clear Sun','5','0','0','0','0','0','0','0','0','18446744073709551615','63','2','1024','0','1',NULL,'0','0','654','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('22540','Runstone_Lux','Lux Anima Rune','11','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','60000','0',NULL,'0',NULL,'20','1','0','itemskill RK_LUXANIMA,1;','',''); +REPLACE INTO `item_db` VALUES ('22540','Runstone_Lux','Lux Anima Rune','11','2','1','100','0','0','0','0','0','128','8','2','0','0','0',NULL,'0','1','0','0','0','0','60000','475',NULL,'0',NULL,'20','1','0','itemskill RK_LUXANIMA,1;','',''); REPLACE INTO `item_db` VALUES ('22777','Buff_Gift_Set','Buff Gift Set','2','20','10','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','499',NULL,'0',NULL,'0',NULL,'0','getitem 14534,5; getitem 12215,5; getitem 12216,5;','',''); REPLACE INTO `item_db` VALUES ('22837','Integer_Time','Integer Time','2','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','50',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','TmpRouletteBronze += 1;','',''); diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 9434ed539..2cf498356 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -169,8 +169,8 @@ REPLACE INTO `item_db` VALUES ('601','Wing_Of_Fly','Fly Wing','11','60','30','50 REPLACE INTO `item_db` VALUES ('602','Wing_Of_Butterfly','Butterfly Wing','11','300','150','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill AL_TELEPORT,3;','',''); REPLACE INTO `item_db` VALUES ('603','Old_Blue_Box','Old Blue Box','2','10000','5000','200','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','8',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 603,1;','',''); REPLACE INTO `item_db` VALUES ('604','Branch_Of_Dead_Tree','Dead Branch','2','50','25','50','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','monster \"this\",-1,-1,\"--ja--\",-1,1,\"\";','',''); -REPLACE INTO `item_db` VALUES ('605','Anodyne','Anodyne','11','2000','1000','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill SM_ENDURE,1;','',''); -REPLACE INTO `item_db` VALUES ('606','Aloebera','Aloevera','11','1500','750','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','itemskill SM_SELFPROVOKE,1;','',''); +REPLACE INTO `item_db` VALUES ('605','Anodyne','Anodyne','11','2000','1000','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill SM_ENDURE,1;','',''); +REPLACE INTO `item_db` VALUES ('606','Aloebera','Aloevera','11','1500','750','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'1',NULL,'0',NULL,'0','itemskill SM_SELFPROVOKE,1;','',''); REPLACE INTO `item_db` VALUES ('607','Yggdrasilberry','Yggdrasil Berry','0','5000','2500','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','5000','0',NULL,'0',NULL,'0',NULL,'0','percentheal 100,100;','',''); REPLACE INTO `item_db` VALUES ('608','Seed_Of_Yggdrasil','Yggdrasil Seed','0','5000','2500','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','3000','0',NULL,'0',NULL,'0',NULL,'0','percentheal 50,50;','',''); REPLACE INTO `item_db` VALUES ('609','Amulet','Amulet','2','100','50','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); @@ -6484,28 +6484,28 @@ REPLACE INTO `item_db` VALUES ('12713','Monster_Extract','Monster Extract','2',' REPLACE INTO `item_db` VALUES ('12714','Easter_Scroll','Easter Scroll','2','1','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','467',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem Easter_Scroll,1;','',''); REPLACE INTO `item_db` VALUES ('12715','Black_Treasure_Box','Black Treasure Chest','2','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('12716','Indian_Rice_Cake','Indian Rice Cake','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('12717','Poison_Paralysis','Paralysis','0','2','1','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_PARALYSE,300000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12718','Poison_Leech','Leech End','0','2','1','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_LEECHESEND,300000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12719','Poison_Oblivion','Oblivion Curse','0','2','1','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_OBLIVIONCURSE,300000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12720','Poison_Contamination','Death Hurt','0','2','1','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_DEATHHURT,300000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12721','Poison_Numb','Toxin','0','2','1','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_TOXIN,300000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12722','Poison_Fever','Pyrexia','0','2','1','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_PYREXIA,300000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12723','Poison_Laughing','Magic Mushroom','0','2','1','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_MAGICMUSHROOM,300000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12724','Poison_Fatigue','Venom Bleed','0','2','1','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_VENOMBLEED,15000,0,10,SCFLAG_FIXEDTICK;','',''); -REPLACE INTO `item_db` VALUES ('12725','Runstone_Nosiege','Nosiege Runestone','11','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','120000','475',NULL,'1',NULL,'20','1','0','itemskill RK_REFRESH,1;','',''); -REPLACE INTO `item_db` VALUES ('12726','Runstone_Rhydo','Rhydo Runestone','11','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','30000','475',NULL,'1',NULL,'20','1','0','itemskill RK_CRUSHSTRIKE,1;','',''); -REPLACE INTO `item_db` VALUES ('12727','Runstone_Verkana','Verkana Runestone','11','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','60000','475',NULL,'1',NULL,'20','1','0','itemskill RK_MILLENNIUMSHIELD,1;','',''); -REPLACE INTO `item_db` VALUES ('12728','Runstone_Isia','Isia Runestone','11','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_VITALITYACTIVATION,1;','',''); -REPLACE INTO `item_db` VALUES ('12729','Runstone_Asir','Asir Runestone','11','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_FIGHTINGSPIRIT,1;','',''); -REPLACE INTO `item_db` VALUES ('12730','Runstone_Urj','Urj Runestone','11','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_ABUNDANCE,1;','',''); -REPLACE INTO `item_db` VALUES ('12731','Runstone_Turisus','Turisus Runestone','11','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_GIANTGROWTH,1;','',''); -REPLACE INTO `item_db` VALUES ('12732','Runstone_Pertz','Pertz Runestone','11','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','1000','475',NULL,'1',NULL,'20','1','0','itemskill RK_STORMBLAST,1;','',''); -REPLACE INTO `item_db` VALUES ('12733','Runstone_Hagalas','Hagalas Runestone','11','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_STONEHARDSKIN,1;','',''); -REPLACE INTO `item_db` VALUES ('12734','Runstone_Quality','Quality Rough Runestone','0','2','1','100','0','0','0','0','0','128','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 5;','',''); -REPLACE INTO `item_db` VALUES ('12735','Runstone_Ancient','Ancient Rough Runestone','0','2','1','100','0','0','0','0','0','128','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 11;','',''); -REPLACE INTO `item_db` VALUES ('12736','Runstone_Mystic','Mystic Rough Runestone','0','2','1','100','0','0','0','0','0','128','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 14;','',''); -REPLACE INTO `item_db` VALUES ('12737','Runstone_Ordinary','General Rough Runestone','0','2','1','100','0','0','0','0','0','128','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 2;','',''); -REPLACE INTO `item_db` VALUES ('12738','Runstone_Rare','Rare Rough Runestone','0','2','1','100','0','0','0','0','0','128','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 8;','',''); +REPLACE INTO `item_db` VALUES ('12717','Poison_Paralysis','Paralysis','0','2','1','20','0','0','0','0','0','4096','56','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_PARALYSE, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12718','Poison_Leech','Leech End','0','2','1','20','0','0','0','0','0','4096','56','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_LEECHESEND, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12719','Poison_Oblivion','Oblivion Curse','0','2','1','20','0','0','0','0','0','4096','56','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_OBLIVIONCURSE, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12720','Poison_Contamination','Death Hurt','0','2','1','20','0','0','0','0','0','4096','56','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_DEATHHURT, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12721','Poison_Numb','Toxin','0','2','1','20','0','0','0','0','0','4096','56','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_TOXIN, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12722','Poison_Fever','Pyrexia','0','2','1','20','0','0','0','0','0','4096','56','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_PYREXIA, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12723','Poison_Laughing','Magic Mushroom','0','2','1','20','0','0','0','0','0','4096','56','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_MAGICMUSHROOM, 300000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12724','Poison_Fatigue','Venom Bleed','0','2','1','20','0','0','0','0','0','4096','56','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_ENCHANTPOISON; sc_start SC_VENOMBLEED, 15000, 0, 10, SCFLAG_FIXEDTICK;','',''); +REPLACE INTO `item_db` VALUES ('12725','Runstone_Nosiege','Nosiege Runestone','11','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','120000','475',NULL,'1',NULL,'20','1','0','itemskill RK_REFRESH, 1;','',''); +REPLACE INTO `item_db` VALUES ('12726','Runstone_Rhydo','Rhydo Runestone','11','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','30000','475',NULL,'1',NULL,'20','1','0','itemskill RK_CRUSHSTRIKE, 1;','',''); +REPLACE INTO `item_db` VALUES ('12727','Runstone_Verkana','Verkana Runestone','11','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','60000','475',NULL,'1',NULL,'20','1','0','itemskill RK_MILLENNIUMSHIELD, 1;','',''); +REPLACE INTO `item_db` VALUES ('12728','Runstone_Isia','Isia Runestone','11','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_VITALITYACTIVATION, 1;','',''); +REPLACE INTO `item_db` VALUES ('12729','Runstone_Asir','Asir Runestone','11','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_FIGHTINGSPIRIT, 1;','',''); +REPLACE INTO `item_db` VALUES ('12730','Runstone_Urj','Urj Runestone','11','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_ABUNDANCE, 1;','',''); +REPLACE INTO `item_db` VALUES ('12731','Runstone_Turisus','Turisus Runestone','11','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_GIANTGROWTH, 1;','',''); +REPLACE INTO `item_db` VALUES ('12732','Runstone_Pertz','Pertz Runestone','11','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','1000','475',NULL,'1',NULL,'20','1','0','itemskill RK_STORMBLAST, 1;','',''); +REPLACE INTO `item_db` VALUES ('12733','Runstone_Hagalas','Hagalas Runestone','11','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','0','475',NULL,'1',NULL,'20','1','0','itemskill RK_STONEHARDSKIN, 1;','',''); +REPLACE INTO `item_db` VALUES ('12734','Runstone_Quality','Quality Rough Runestone','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 5;','',''); +REPLACE INTO `item_db` VALUES ('12735','Runstone_Ancient','Ancient Rough Runestone','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 11;','',''); +REPLACE INTO `item_db` VALUES ('12736','Runstone_Mystic','Mystic Rough Runestone','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 14;','',''); +REPLACE INTO `item_db` VALUES ('12737','Runstone_Ordinary','General Rough Runestone','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 2;','',''); +REPLACE INTO `item_db` VALUES ('12738','Runstone_Rare','Rare Rough Runestone','0','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','1','0','0',NULL,'0',NULL,'0',NULL,'0','makerune 8;','',''); REPLACE INTO `item_db` VALUES ('12739','Snow_Flower','Snow Flower','2','0','0','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','percentheal 10,10;','',''); REPLACE INTO `item_db` VALUES ('12740','Inc_Str_Scroll','Amplification Scroll','2','1','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_POTION_BERSERK; sc_start SC_STR_SCROLL, 60000, 20;','',''); REPLACE INTO `item_db` VALUES ('12741','Inc_Int_Scroll','Intellect Amplification Scroll','2','1','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','507',NULL,'0',NULL,'0',NULL,'0','specialeffect2 EF_SPELLBREAKER; sc_start SC_INT_SCROLL, 60000, 20;','',''); @@ -9772,7 +9772,7 @@ REPLACE INTO `item_db` VALUES ('22085','Elegant_Doram_Shoes','Elegant Doram Shoe REPLACE INTO `item_db` VALUES ('22508','Para_Team_Mark_','Eden Group Mark','11','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','1200000','507',NULL,'0',NULL,'0',NULL,'0','warp \"moc_para01\", 171, 115;','',''); REPLACE INTO `item_db` VALUES ('22514','Candy_Holder','Candy Holder','11','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('22515','Key_Of_Twisted_Time','Twisted Key of Time','3','10','5','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); -REPLACE INTO `item_db` VALUES ('22540','Runstone_Lux','Lux Anima Rune','11','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','60000','475',NULL,'0',NULL,'20','1','0','itemskill RK_LUXANIMA,1;','',''); +REPLACE INTO `item_db` VALUES ('22540','Runstone_Lux','Lux Anima Rune','11','2','1','100','0','0','0','0','0','128','56','2','0','0','0',NULL,'0','1','0','0','0','0','60000','475',NULL,'0',NULL,'20','1','0','itemskill RK_LUXANIMA, 1;','',''); REPLACE INTO `item_db` VALUES ('22669','HALLOWEEN_G_BOX','Halloween Box','2','0','0','20','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','getrandgroupitem 22669,1;','',''); REPLACE INTO `item_db` VALUES ('22670','DARK_INVITATION','Invitation of Darkness','2','10','5','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','.@temp = rand(1,3); if (.@temp == 1) { specialeffect2 EF_DEVIL; warp \"niflheim\",193,186; } else if (.@temp == 2) { specialeffect2 EF_DEVIL; warp \"niflheim\",106,254; } else { specialeffect2 EF_DEVIL; warp \"niflheim\",347,255; }','',''); REPLACE INTO `item_db` VALUES ('22675','Mysterious_Scroll','Mysterious Scroll','2','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','sc_start SC_FOOD_INT,3600000,30;','',''); diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 881e50497..bf816faa7 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -8420,22 +8420,24 @@ ACMD(charcommands) return true; } -/* for new mounts */ +/* For new mounts */ ACMD(cashmount) { if (pc_hasmount(sd)) { - clif->message(fd, msg_fd(fd,1476)); // You are already mounting something else + clif->message(fd, msg_fd(fd, 1476)); // You are already mounting something else return false; } - clif->message(sd->fd,msg_fd(fd,1362)); // NOTICE: If you crash with mount your LUA is outdated. + clif->message(sd->fd, msg_fd(fd, 1362)); // NOTICE: If you crash with mount your LUA is outdated. + if (!sd->sc.data[SC_ALL_RIDING]) { - clif->message(sd->fd,msg_fd(fd,1363)); // You have mounted. - sc_start(NULL, &sd->bl, SC_ALL_RIDING, 100, 25, INFINITE_DURATION); + clif->message(sd->fd, msg_fd(fd, 1363)); // You have mounted. + sc_start(NULL, &sd->bl, SC_ALL_RIDING, 100, battle_config.boarding_halter_speed, INFINITE_DURATION); } else { - clif->message(sd->fd,msg_fd(fd,1364)); // You have released your mount. + clif->message(sd->fd, msg_fd(fd, 1364)); // You have released your mount. status_change_end(&sd->bl, SC_ALL_RIDING, INVALID_TIMER); } + return true; } diff --git a/src/map/battle.c b/src/map/battle.c index 63252caf7..a4e6d8dd1 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -7333,6 +7333,8 @@ static const struct battle_data { { "max_summoner_parameter", &battle_config.max_summoner_parameter, 120, 10, 10000, }, { "mvp_exp_reward_message", &battle_config.mvp_exp_reward_message, 0, 0, 1, }, { "monster_eye_range_bonus", &battle_config.mob_eye_range_bonus, 0, 0, 10, }, + { "prevent_logout_trigger", &battle_config.prevent_logout_trigger, 0xE, 0, 0xF, }, + { "boarding_halter_speed", &battle_config.boarding_halter_speed, 25, 0, 100, }, }; #ifndef STATS_OPT_OUT /** diff --git a/src/map/battle.h b/src/map/battle.h index 806b07a20..d582f3c92 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -552,6 +552,9 @@ struct Battle_Config { int mvp_exp_reward_message; int mob_eye_range_bonus; //Vulture's Eye and Snake's Eye range bonus + + int prevent_logout_trigger; + int boarding_halter_speed; }; /* criteria for battle_config.idletime_critera */ diff --git a/src/map/clif.c b/src/map/clif.c index 5939222e9..b5ebc4897 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10632,9 +10632,11 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd) clif->clearunit_area(&sd->bl,CLR_DEAD); return; } - if( sd->npc_id || sd->state.workinprogress&2 ){ -#ifdef RENEWAL - clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message. + if (sd->npc_id || sd->state.workinprogress & 2) { +#if PACKETVER >= 20110309 + clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); +#else + clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48)); #endif return; } @@ -10647,9 +10649,11 @@ void clif_parse_NpcClicked(int fd,struct map_session_data *sd) clif->pActionRequest_sub(sd, 0x07, bl->id, timer->gettick()); break; case BL_NPC: - if( sd->ud.skill_id < RK_ENCHANTBLADE && sd->ud.skilltimer != INVALID_TIMER ) {// TODO: should only work with none 3rd job skills -#ifdef RENEWAL + if (sd->ud.skill_id < RK_ENCHANTBLADE && sd->ud.skilltimer != INVALID_TIMER) { // TODO: should only work with none 3rd job skills +#if PACKETVER >= 20110309 clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); +#else + clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48)); #endif break; } @@ -11025,39 +11029,38 @@ void clif_parse_RemoveOption(int fd,struct map_session_data *sd) void clif_parse_ChangeCart(int fd,struct map_session_data *sd) __attribute__((nonnull (2))); /// Request to change cart's visual look (CZ_REQ_CHANGECART). /// 01af <num>.W -void clif_parse_ChangeCart(int fd,struct map_session_data *sd) +void clif_parse_ChangeCart(int fd, struct map_session_data *sd) {// TODO: State tracking? int type; - if( pc->checkskill(sd, MC_CHANGECART) < 1 ) + if (pc->checkskill(sd, MC_CHANGECART) == 0) return; -#ifdef RENEWAL - if( sd->npc_id || sd->state.workinprogress&1 ){ + if (sd->npc_id || sd->state.workinprogress & 1) { +#if PACKETVER >= 20110309 clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); +#else + clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48)); +#endif return; } -#endif - type = RFIFOW(fd,2); + type = RFIFOW(fd, 2); + + if ( #ifdef NEW_CARTS - if( (type == 9 && sd->status.base_level > 131) || - (type == 8 && sd->status.base_level > 121) || - (type == 7 && sd->status.base_level > 111) || - (type == 6 && sd->status.base_level > 101) || + (type == 9 && sd->status.base_level > 130) || + (type == 8 && sd->status.base_level > 120) || + (type == 7 && sd->status.base_level > 110) || + (type == 6 && sd->status.base_level > 100) || +#endif (type == 5 && sd->status.base_level > 90) || (type == 4 && sd->status.base_level > 80) || (type == 3 && sd->status.base_level > 65) || (type == 2 && sd->status.base_level > 40) || (type == 1)) -#else - if( (type == 5 && sd->status.base_level > 90) || - (type == 4 && sd->status.base_level > 80) || - (type == 3 && sd->status.base_level > 65) || - (type == 2 && sd->status.base_level > 40) || - (type == 1)) -#endif - pc->setcart(sd,type); + + pc->setcart(sd, type); } /// Request to select cart's visual look for new cart design (CZ_SELECTCART). @@ -11244,9 +11247,11 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) // Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex] pc->update_idle_time(sd, BCIDLE_USESKILLTOID); - if( sd->npc_id || sd->state.workinprogress&1 ){ -#ifdef RENEWAL - clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message. + if (sd->npc_id || sd->state.workinprogress & 1) { +#if PACKETVER >= 20110309 + clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); +#else + clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48)); #endif return; } @@ -11341,12 +11346,14 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, uint16 ski return; } -#ifdef RENEWAL - if( sd->state.workinprogress&1 ){ - clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message. + if (sd->state.workinprogress & 1) { +#if PACKETVER >= 20110309 + clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); +#else + clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48)); +#endif return; } -#endif //Whether skill fails or not is irrelevant, the char ain't idle. [Skotlex] pc->update_idle_time(sd, BCIDLE_USESKILLTOPOS); diff --git a/src/map/clif.h b/src/map/clif.h index 8af745337..ccb227267 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -69,6 +69,7 @@ struct view_data; #define COLOR_RED 0xff0000U #define COLOR_GREEN 0x00ff00U #define COLOR_WHITE 0xffffffU +#define COLOR_YELLOW 0xffff00U #define COLOR_DEFAULT COLOR_GREEN /** diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 618111d2a..138a783ae 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -147,6 +147,23 @@ enum item_itemid { ITEMID_BLACK_THING = 12435, ITEMID_BOARDING_HALTER = 12622, ITEMID_NOBLE_NAMEPLATE = 12705, + ITEMID_POISON_PARALYSIS = 12717, + ITEMID_POISON_LEECH = 12718, + ITEMID_POISON_OBLIVION = 12719, + ITEMID_POISON_CONTAMINATION = 12720, + ITEMID_POISON_NUMB = 12721, + ITEMID_POISON_FEVER = 12722, + ITEMID_POISON_LAUGHING = 12723, + ITEMID_POISON_FATIGUE = 12724, + ITEMID_NAUTHIZ = 12725, + ITEMID_RAIDO = 12726, + ITEMID_BERKANA = 12727, + ITEMID_ISA = 12728, + ITEMID_OTHILA = 12729, + ITEMID_URUZ = 12730, + ITEMID_THURISAZ = 12731, + ITEMID_WYRD = 12732, + ITEMID_HAGALAZ = 12733, ITEMID_DUN_TELE_SCROLL1 = 14527, ITEMID_BATTLE_MANUAL25 = 14532, ITEMID_BATTLE_MANUAL100 = 14533, @@ -161,6 +178,7 @@ enum item_itemid { ITEMID_PILEBUNCKER_S = 16030, ITEMID_PILEBUNCKER_P = 16031, ITEMID_PILEBUNCKER_T = 16032, + ITEMID_LUX_ANIMA = 22540, }; enum cards_item_list { @@ -262,37 +280,6 @@ enum cash_food_item_list { }; /** - * GC Poison - */ -enum poison_item_list { - ITEMID_POISON_PARALYSIS = 12717, - ITEMID_POISON_LEECH, // 12718 - ITEMID_POISON_OBLIVION, // 12719 - ITEMID_POISON_CONTAMINATION, // 12720 - ITEMID_POISON_NUMB, // 12721 - ITEMID_POISON_FEVER, // 12722 - ITEMID_POISON_LAUGHING, // 12723 - ITEMID_POISON_FATIGUE, // 12724 -}; - - -/** - * Rune Knight - **/ -enum rune_item_list { - ITEMID_NAUTHIZ = 12725, - ITEMID_RAIDO, // 12726 - ITEMID_BERKANA, // 12727 - ITEMID_ISA, // 12728 - ITEMID_OTHILA, // 12729 - ITEMID_URUZ, // 12730 - ITEMID_THURISAZ, // 12731 - ITEMID_WYRD, // 12732 - ITEMID_HAGALAZ, // 12733 - ITEMID_LUX_ANIMA = 22540, -}; - -/** * Geneticist */ enum geneticist_item_list { @@ -566,7 +553,6 @@ struct item_data { #define itemdb_canrefine(n) (!itemdb->search(n)->flag.no_refine) #define itemdb_allowoption(n) (!itemdb->search(n)->flag.no_options) -#define itemdb_is_rune(n) (((n) >= ITEMID_NAUTHIZ && (n) <= ITEMID_HAGALAZ) || (n) == ITEMID_LUX_ANIMA) #define itemdb_is_element(n) ((n) >= ITEMID_SCARLET_PTS && (n) <= ITEMID_LIME_GREEN_PTS) #define itemdb_is_spellbook(n) ((n) >= ITEMID_MAGIC_BOOK_FB && (n) <= ITEMID_MAGIC_BOOK_DL) #define itemdb_is_poison(n) ((n) >= ITEMID_POISON_PARALYSIS && (n) <= ITEMID_POISON_FATIGUE) diff --git a/src/map/npc.h b/src/map/npc.h index 6180e9765..3bd11d536 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -125,7 +125,6 @@ struct npc_data { struct hplugin_data_store *hdata; ///< HPM Plugin Data Store }; - #define START_NPC_NUM 110000000 enum actor_classes { @@ -142,7 +141,7 @@ enum actor_classes { #define MAX_NPC_CLASS 1000 // New NPC range #define MAX_NPC_CLASS2_START 10001 -#define MAX_NPC_CLASS2_END 10203 +#define MAX_NPC_CLASS2_END 10248 //Script NPC events. enum npce_event { diff --git a/src/map/packets.h b/src/map/packets.h index 418beb41a..cc2312356 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -2222,6 +2222,44 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x0436,4,clif->pDull); // CZ_GANGSI_RANK #endif +// 2012-09-25aRagexe +#if PACKETVER >= 20120925 +// new packets (not all) + packet(0x0998,8,clif->pEquipItem,2,4); +#endif + +// 2013-02-06aRagexe +#if PACKETVER >= 20130206 +// new packets + packet(0x09a4,18); // ZC_DISPATCH_TIMING_INFO_CHN +// changed packet sizes +#endif + +// 2013-03-06aRagexe +#if PACKETVER >= 20130306 +// new packets + packet(0x09a6,12); // ZC_BANKING_CHECK + packet(0x09a7,14,clif->pDull/*,XXX*/); // CZ_REQ_BANKING_DEPOSIT + packet(0x09a8,4); // ZC_ACK_BANKING_DEPOSIT + packet(0x09a9,14,clif->pDull/*,XXX*/); // CZ_REQ_BANKING_WITHDRAW + packet(0x09aa,4); // ZC_ACK_BANKING_WITHDRAW +// changed packet sizes +#endif + +// 2013-03-13aRagexe +#if PACKETVER >= 20130313 +// new packets + packet(0x09ab,-1,clif->pDull/*,XXX*/); // CZ_REQ_BANKING_CHECK + packet(0x09ac,20,clif->pDull/*,XXX*/); // CZ_REQ_CASH_BARGAIN_SALE_ITEM_INFO + packet(0x09ad,6); // ZC_ACK_CASH_BARGAIN_SALE_ITEM_INFO + packet(0x09ae,-1,clif->pDull/*,XXX*/); // CZ_REQ_APPLY_BARGAIN_SALE_ITEM + packet(0x09af,-1); // ZC_ACK_APPLY_BARGAIN_SALE_ITEM + packet(0x09b0,8,clif->pDull/*,XXX*/); // CZ_REQ_REMOVE_BARGAIN_SALE_ITEM + packet(0x09b1,6); // ZC_ACK_REMOVE_BARGAIN_SALE_ITEM + packet(0x09b2,-1); // ZC_NOTIFY_BARGAIN_SALE_SELLING +// changed packet sizes +#endif + //2013-03-20Ragexe (Judas + Yommy) #if PACKETVER >= 20130320 // Shuffle Start @@ -2260,13 +2298,36 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x095a,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD // Shuffle End - // New Packets - packet(0x0998,8,clif->pEquipItem,2,4); + // New Packets (wrong version or packet not exists) packet(0x0447,2); // PACKET_CZ_BLOCKING_PLAY_CANCEL packet(0x099f,24); // New Packets End #endif +#if PACKETVER >= 20130320 +// new packets +// changed packet sizes + packet(0x09a7,10,clif->pBankDeposit,2,4,6); // CZ_REQ_BANKING_DEPOSIT + packet(0x09a8,12); // ZC_ACK_BANKING_DEPOSIT + packet(0x09a9,10,clif->pBankWithdraw,2,4,6); // CZ_REQ_BANKING_WITHDRAW + packet(0x09aa,12); // ZC_ACK_BANKING_WITHDRAW + packet(0x09ab,6,clif->pBankCheck,2,4); // CZ_REQ_BANKING_CHECK +#endif + +// 2013-03-27bRagexe +#if PACKETVER >= 20130327 +// new packets + packet(0x09ac,-1,clif->pDull/*,XXX*/); // CZ_REQ_CASH_BARGAIN_SALE_ITEM_INFO + packet(0x09ad,10); // ZC_ACK_CASH_BARGAIN_SALE_ITEM_INFO + packet(0x09ae,17,clif->pDull/*,XXX*/); // CZ_REQ_APPLY_BARGAIN_SALE_ITEM + packet(0x09af,4); // ZC_ACK_APPLY_BARGAIN_SALE_ITEM + packet(0x09b0,8,clif->pDull/*,XXX*/); // CZ_REQ_REMOVE_BARGAIN_SALE_ITEM + packet(0x09b1,4); // ZC_ACK_REMOVE_BARGAIN_SALE_ITEM + packet(0x09b2,6); // ZC_NOTIFY_BARGAIN_SALE_SELLING + packet(0x09b3,6); // ZC_NOTIFY_BARGAIN_SALE_CLOSE +// changed packet sizes +#endif + //2013-05-15aRagexe (Shakto) #if PACKETVER >= 20130515 // Shuffle Start @@ -2529,20 +2590,74 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x0436,4,clif->pDull); // CZ_GANGSI_RANK #endif -/* Bank System [Yommy/Hercules] */ -#if PACKETVER >= 20130724 -// shuffle packets not added - packet(0x09A6,12); // ZC_BANKING_CHECK - packet(0x09A7,10,clif->pBankDeposit,2,4,6); - packet(0x09A8,16); // ZC_ACK_BANKING_DEPOSIT - packet(0x09A9,10,clif->pBankWithdraw,2,4,6); - packet(0x09AA,16); // ZC_ACK_BANKING_WITHDRAW - packet(0x09AB,6,clif->pBankCheck,2,4); - //// - packet(0x09B6,6,clif->pBankOpen,2,4); - packet(0x09B7,4); // ZC_ACK_OPEN_BANKING - packet(0x09B8,6,clif->pBankClose,2,4); - packet(0x09B9,4); // ZC_ACK_CLOSE_BANKING +// 2013-04-17aRagexe +#if PACKETVER >= 20130417 +// new packets + packet(0x09b4,6,clif->pDull/*,XXX*/); // CZ_OPEN_BARGAIN_SALE_TOOL + packet(0x09b5,2); // ZC_OPEN_BARGAIN_SALE_TOOL + packet(0x09b6,6,clif->pBankOpen,2,4); // CZ_REQ_OPEN_BANKING + packet(0x09b7,4); // ZC_ACK_OPEN_BANKING + packet(0x09b8,6,clif->pBankClose,2,4); // CZ_REQ_CLOSE_BANKING + packet(0x09b9,4); // ZC_ACK_CLOSE_BANKING +// changed packet sizes +#endif + +// 2013-04-24aRagexe +#if PACKETVER >= 20130424 +// new packets + packet(0x09ba,6,clif->pDull/*,XXX*/); // CZ_REQ_OPEN_GUILD_STORAGE + packet(0x09bb,4); // ZC_ACK_OPEN_GUILD_STORAGE + packet(0x09bc,6,clif->pDull/*,XXX*/); // CZ_CLOSE_BARGAIN_SALE_TOOL + packet(0x09bd,2); // ZC_CLOSE_BARGAIN_SALE_TOOL +// changed packet sizes +#endif + +// 2013-05-02aRagexe +#if PACKETVER >= 20130502 +// new packets + packet(0x09be,6,clif->pDull/*,XXX*/); // CZ_REQ_CLOSE_GUILD_STORAGE + packet(0x09bf,4); // ZC_ACK_CLOSE_GUILD_STORAGE +// changed packet sizes + packet(0x09bb,6); // ZC_ACK_OPEN_GUILD_STORAGE +#endif + +// 2013-05-15aRagexe +#if PACKETVER >= 20130515 +// new packets + packet(0x09c0,11); // ZC_ACTION_MOVE + packet(0x09c1,11); // ZC_C_MARKERINFO +// changed packet sizes + packet(0x09a8,16); // ZC_ACK_BANKING_DEPOSIT + packet(0x09aa,16); // ZC_ACK_BANKING_WITHDRAW +#endif + +// 2013-05-29Ragexe +#if PACKETVER >= 20130529 +// new packets + packet(0x09c3,8,clif->pDull/*,XXX*/); // CZ_REQ_COUNT_BARGAIN_SALE_ITEM +// changed packet sizes +#endif + +// 2013-06-05Ragexe +#if PACKETVER >= 20130605 +// new packets + packet(0x09c4,8); // ZC_ACK_COUNT_BARGAIN_SALE_ITEM +#endif + +// 2013-06-18aRagexe +#if PACKETVER >= 20130618 +// new packets + packet(0x09ca,23); // ZC_SKILL_ENTRY5 +// changed packet sizes +#endif + +// 2013-07-17cRagexe +#if PACKETVER >= 20130717 +// new packets + packet(0x09cb,17); // ZC_USE_SKILL2 + packet(0x09cc,-1); // ZC_SECRETSCAN_DATA +// changed packet sizes + packet(0x09c1,10); // ZC_C_MARKERINFO #endif //2013-08-07Ragexe (Shakto) @@ -2582,6 +2697,13 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x0436,4,clif->pDull); // CZ_GANGSI_RANK #endif +// 2013-08-07aRagexe +#if PACKETVER >= 20130807 +// new packets + packet(0x09cd,8); // ZC_MSG_COLOR +// changed packet sizes +#endif + //2013-08-14aRagexe - Themon #if PACKETVER >= 20130814 packet(0x0874,7,clif->pActionRequest,2,6); @@ -2619,6 +2741,84 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x0896,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD #endif +// 2013-08-14aRagexe +#if PACKETVER >= 20130814 +// new packets + packet(0x09ce,102,clif->pGM_Monster_Item,2); // CZ_ITEM_CREATE_EX + packet(0x09cf,-1); // ZC_NPROTECTGAMEGUARDCSAUTH + packet(0x09d0,-1,clif->pDull/*,XXX*/); // CZ_NPROTECTGAMEGUARDCSAUTH +// changed packet sizes +#endif + +// 2013-08-21bRagexe +#if PACKETVER >= 20130821 +// new packets + packet(0x09d1,14); // ZC_PROGRESS_ACTOR +// changed packet sizes +#endif + +// 2013-08-28bRagexe +#if PACKETVER >= 20130828 +// new packets + packet(0x09d2,-1); // ZC_GUILDSTORAGE_ITEMLIST_NORMAL_V5 + packet(0x09d3,-1); // ZC_GUILDSTORAGE_ITEMLIST_EQUIP_V5 +// changed packet sizes + packet(0x09ba,2,clif->pDull/*,XXX*/); // CZ_REQ_OPEN_GUILD_STORAGE + packet(0x09be,2,clif->pDull/*,XXX*/); // CZ_REQ_CLOSE_GUILD_STORAGE +#endif + +// 2013-09-04aRagexe +#if PACKETVER >= 20130904 +// new packets +// changed packet sizes + packet(0x09ca,-1); // ZC_SKILL_ENTRY5 +#endif + +// 2013-09-11aRagexe +#if PACKETVER >= 20130911 +// new packets + packet(0x09d4,2,clif->pNPCShopClosed); // CZ_NPC_TRADE_QUIT + packet(0x09d5,-1); // ZC_NPC_MARKET_OPEN + packet(0x09d6,-1,clif->pNPCMarketPurchase); // CZ_NPC_MARKET_PURCHASE + packet(0x09d7,-1); // ZC_NPC_MARKET_PURCHASE_RESULT + packet(0x09d8,2,clif->pNPCMarketClosed); // CZ_NPC_MARKET_CLOSE + packet(0x09d9,2,clif->pDull/*,XXX*/); // CZ_REQ_GUILDSTORAGE_LOG + packet(0x09da,2); // ZC_ACK_GUILDSTORAGE_LOG +// changed packet sizes +#endif + +// 2013-09-25aRagexe +#if PACKETVER >= 20130925 +// new packets +// changed packet sizes + packet(0x09da,10); // ZC_ACK_GUILDSTORAGE_LOG +#endif + +// 2013-10-02aRagexe +#if PACKETVER >= 20131002 +// new packets +// changed packet sizes + packet(0x09d9,4,clif->pDull/*,XXX*/); // CZ_REQ_GUILDSTORAGE_LOG + packet(0x09da,-1); // ZC_ACK_GUILDSTORAGE_LOG +#endif + +// 2013-10-16aRagexe +#if PACKETVER >= 20131016 +// new packets +// changed packet sizes + packet(0x09d9,6,clif->pDull/*,XXX*/); // CZ_REQ_GUILDSTORAGE_LOG +#endif + +// 2013-10-23aRagexe +#if PACKETVER >= 20131023 +// new packets + packet(0x09db,-1); // ZC_NOTIFY_MOVEENTRY10 + packet(0x09dc,-1); // ZC_NOTIFY_NEWENTRY10 + packet(0x09dd,-1); // ZC_NOTIFY_STANDENTRY10 +// changed packet sizes + packet(0x09d9,4,clif->pDull/*,XXX*/); // CZ_REQ_GUILDSTORAGE_LOG +#endif + // 2013-10-30aRagexe #if PACKETVER >= 20131030 // new packets @@ -2627,6 +2827,43 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x09e0,-1); // SC_LOGIN_ANSWER_WITH_ID #endif +// 2013-11-06aRagexe +#if PACKETVER >= 20131106 +// new packets + packet(0x09e1,8,clif->pDull/*,XXX*/); // CZ_MOVE_ITEM_FROM_BODY_TO_GUILDSTORAGE + packet(0x09e2,8,clif->pDull/*,XXX*/); // CZ_MOVE_ITEM_FROM_GUILDSTORAGE_TO_BODY + packet(0x09e3,8,clif->pDull/*,XXX*/); // CZ_MOVE_ITEM_FROM_CART_TO_GUILDSTORAGE + packet(0x09e4,8,clif->pDull/*,XXX*/); // CZ_MOVE_ITEM_FROM_GUILDSTORAGE_TO_CART +// changed packet sizes +#endif + +// 2013-11-20dRagexe +#if PACKETVER >= 20131120 +// new packets + packet(0x09e5,14); // ZC_DELETEITEM_FROM_MCSTORE2 + packet(0x09e6,18); // ZC_UPDATE_ITEM_FROM_BUYING_STORE2 +// changed packet sizes +#endif + +// 2013-11-27bRagexe +#if PACKETVER >= 20131127 +// new packets +// changed packet sizes + packet(0x09e5,18); // ZC_DELETEITEM_FROM_MCSTORE2 + packet(0x09e6,22); // ZC_UPDATE_ITEM_FROM_BUYING_STORE2 +#endif + +// 2013-12-11dRagexe +#if PACKETVER >= 20131211 +// new packets + packet(0x09e7,2); // ZC_NOTIFY_UNREAD_RODEX + packet(0x09e8,18,clif->pDull/*,XXX*/); // CZ_OPEN_RODEXBOX + packet(0x09e9,2,clif->pDull/*,XXX*/); // CZ_CLOSE_RODEXBOX + packet(0x09ed,-1); // ZC_ACK_SEND_RODEX + packet(0x09ee,-1,clif->pDull/*,XXX*/); // CZ_REQ_NEXT_RODEX +// changed packet sizes +#endif + // 2013-12-18bRagexe - Yommy #if PACKETVER >= 20131218 packet(0x0369,7,clif->pActionRequest,2,6); @@ -2658,12 +2895,20 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x085C,36,clif->pStoragePassword,0); packet(0x0363,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD packet(0x087b,4,clif->pDull); // CZ_GANGSI_RANK - /* New */ - packet(0x09d4,2,clif->pNPCShopClosed); - packet(0x09ce,102,clif->pGM_Monster_Item,2); - /* NPC Market */ - packet(0x09d8,2,clif->pNPCMarketClosed); - packet(0x09d6,-1,clif->pNPCMarketPurchase); +#endif + +// 2013-12-18bRagexe +#if PACKETVER >= 20131218 +// new packets + packet(0x09ea,10,clif->pDull/*,XXX*/); // CZ_REQ_READ_RODEX + packet(0x09eb,14); // ZC_ACK_READ_RODEX + packet(0x09ef,11,clif->pDull/*,XXX*/); // CZ_REQ_REFRESH_RODEX + packet(0x09f0,-1); // ZC_ACK_RODEX_LIST + packet(0x09f5,11,clif->pDull/*,XXX*/); // CZ_REQ_DELETE_RODEX + packet(0x09f6,11); // ZC_ACK_DELETE_RODEX +// changed packet sizes + packet(0x09e8,10,clif->pDull/*,XXX*/); // CZ_OPEN_RODEXBOX + packet(0x09ee,11,clif->pDull/*,XXX*/); // CZ_REQ_NEXT_RODEX #endif // 2013-12-23cRagexe - Yommy @@ -2697,7 +2942,14 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x08A4,36,clif->pStoragePassword,0); packet(0x0363,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD packet(0x0436,4,clif->pDull); // CZ_GANGSI_RANK - packet(0x09cb,17); +#endif + +// 2013-12-23bRagexe +#if PACKETVER >= 20131223 +// new packets +// changed packet sizes + packet(0x09ea,11,clif->pDull/*,XXX*/); // CZ_REQ_READ_RODEX + packet(0x09eb,24); // ZC_ACK_READ_RODEX #endif // 2013-12-30aRagexe - Yommy @@ -2733,6 +2985,16 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x093e,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD #endif +// 2013-12-30aRagexe +#if PACKETVER >= 20131230 +// new packets + packet(0x09ec,-1,clif->pDull/*,XXX*/); // CZ_REQ_SEND_RODEX + packet(0x09ed,3); // ZC_ACK_SEND_RODEX + packet(0x09f7,75); // ZC_PROPERTY_HOMUN_2 +// changed packet sizes + packet(0x09eb,23); // ZC_ACK_READ_RODEX +#endif + // 2014 Packet Data // 2014-01-15eRagexe @@ -3213,8 +3475,6 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x0936,36,clif->pStoragePassword,0); packet(0x0363,8,clif->pDull); // CZ_JOIN_BATTLE_FIELD packet(0x0922,4,clif->pDull); // CZ_GANGSI_RANK - packet(0x09e5,18); // ZC_DELETEITEM_FROM_MCSTORE2 - packet(0x09e6,22); // ZC_UPDATE_ITEM_FROM_BUYING_STORE2 #endif // 2014-10-22bRagexe - YomRawr @@ -3730,7 +3990,6 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x0817,5,clif->pHomMenu,2,4); packet(0x0923,36,clif->pStoragePassword,0); packet(0x0a27,8); // ZC_RECOVERY2 - packet(0x09f7,75); // ZC_PROPERTY_HOMUN_2 #endif // 2015-05-20aRagexeRE diff --git a/src/map/pc.c b/src/map/pc.c index 30c07a58e..582abf71c 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -741,7 +741,8 @@ int pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int lo sd->client_tick = client_tick; sd->state.active = 0; //to be set to 1 after player is fully authed and loaded. sd->bl.type = BL_PC; - sd->canlog_tick = timer->gettick(); + if (battle_config.prevent_logout_trigger & PLT_LOGIN) + sd->canlog_tick = timer->gettick(); //Required to prevent homunculus copuing a base speed of 0. sd->battle_status.speed = sd->base_status.speed = DEFAULT_WALK_SPEED; sd->state.warp_clean = 1; @@ -4840,11 +4841,7 @@ int pc_isUseitem(struct map_session_data *sd,int n) switch( nameid ) { // TODO: Is there no better way to handle this, other than hardcoding item IDs? case ITEMID_ANODYNE: - if( map_flag_gvg2(sd->bl.m) ) - return 0; - /* Fall through */ - case ITEMID_ALOEBERA: - if( pc_issit(sd) ) + if (map_flag_gvg2(sd->bl.m)) return 0; break; @@ -4951,17 +4948,6 @@ int pc_isUseitem(struct map_session_data *sd,int n) if( nameid >= ITEMID_BOW_MERCENARY_SCROLL1 && nameid <= ITEMID_SPEARMERCENARY_SCROLL10 && sd->md != NULL ) // Mercenary Scrolls return 0; - /** - * Only Rune Knights may use runes - **/ - if (itemdb_is_rune(nameid) && (sd->job & MAPID_THIRDMASK) != MAPID_RUNE_KNIGHT) - return 0; - /** - * Only GCross may use poisons - **/ - else if (itemdb_is_poison(nameid) && (sd->job & MAPID_THIRDMASK) != MAPID_GUILLOTINE_CROSS) - return 0; - if( item->package || item->group ) { if (pc_is90overweight(sd)) { clif->msgtable(sd, MSG_ITEM_CANT_OBTAIN_WEIGHT); @@ -5049,10 +5035,11 @@ int pc_useitem(struct map_session_data *sd,int n) { nullpo_ret(sd); Assert_ret(n >= 0 && n < MAX_INVENTORY); - if( sd->npc_id || sd->state.workinprogress&1 ){ - /* TODO: add to clif->messages enum */ -#ifdef RENEWAL - clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); // TODO look for the client date that has this message. + if (sd->npc_id || sd->state.workinprogress & 1) { +#if PACKETVER >= 20110309 + clif->msgtable(sd, MSG_NPC_WORK_IN_PROGRESS); +#else + clif->messagecolor_self(fd, COLOR_WHITE, msg_fd(fd, 48)); #endif return 0; } @@ -5108,15 +5095,22 @@ int pc_useitem(struct map_session_data *sd,int n) { if( sd->inventory_data[n]->flag.delay_consume && ( sd->ud.skilltimer != INVALID_TIMER /*|| !status->check_skilluse(&sd->bl, &sd->bl, ALL_RESURRECTION, 0)*/ ) ) return 0; - if( sd->inventory_data[n]->delay > 0 ) { - ARR_FIND(0, MAX_ITEMDELAYS, i, sd->item_delay[i].nameid == nameid ); - if( i == MAX_ITEMDELAYS ) /* item not found. try first empty now */ - ARR_FIND(0, MAX_ITEMDELAYS, i, !sd->item_delay[i].nameid ); - if( i < MAX_ITEMDELAYS ) { - if( sd->item_delay[i].nameid ) {// found - if( DIFF_TICK(sd->item_delay[i].tick, tick) > 0 ) { - int e_tick = (int)(DIFF_TICK(sd->item_delay[i].tick, tick)/1000); - clif->msgtable_num(sd, MSG_SECONDS_UNTIL_USE, e_tick + 1); // [%d] seconds left until you can use + if (sd->inventory_data[n]->delay > 0) { + ARR_FIND(0, MAX_ITEMDELAYS, i, sd->item_delay[i].nameid == nameid); + if (i == MAX_ITEMDELAYS) /* item not found. try first empty now */ + ARR_FIND(0, MAX_ITEMDELAYS, i, sd->item_delay[i].nameid == 0); + if (i < MAX_ITEMDELAYS) { + if (sd->item_delay[i].nameid != 0) {// found + if (DIFF_TICK(sd->item_delay[i].tick, tick) > 0) { + int delay_tick = (int)(DIFF_TICK(sd->item_delay[i].tick, tick) / 1000); +#if PACKETVER >= 20101123 + clif->msgtable_num(sd, MSG_SECONDS_UNTIL_USE, delay_tick + 1); // [%d] seconds left until you can use +#else + char delay_msg[100]; + clif->msgtable_num(sd, MSG_SECONDS_UNTIL_USE, delay_tick + 1); // [%d] seconds left until you can use + sprintf(delay_msg, msg_sd(sd, 26), delay_tick + 1); + clif->messagecolor_self(sd->fd, COLOR_YELLOW, delay_msg); +#endif return 0; // Delay has not expired yet } } else {// not yet used item (all slots are initially empty) @@ -7649,22 +7643,42 @@ int pc_skillatk_bonus(struct map_session_data *sd, uint16 skill_id) return bonus; } -int pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) { +int pc_skillheal_bonus(struct map_session_data *sd, uint16 skill_id) +{ int i, bonus = sd->bonus.add_heal_rate; - if( bonus ) { - switch( skill_id ) { - case AL_HEAL: if( !(battle_config.skill_add_heal_rate&1) ) bonus = 0; break; - case PR_SANCTUARY: if( !(battle_config.skill_add_heal_rate&2) ) bonus = 0; break; - case AM_POTIONPITCHER: if( !(battle_config.skill_add_heal_rate&4) ) bonus = 0; break; - case CR_SLIMPITCHER: if( !(battle_config.skill_add_heal_rate&8) ) bonus = 0; break; - case BA_APPLEIDUN: if( !(battle_config.skill_add_heal_rate&16)) bonus = 0; break; + if (bonus) { + switch (skill_id) { + case AL_HEAL: + if ((battle_config.skill_add_heal_rate & 1) == 0) + bonus = 0; + break; + case PR_SANCTUARY: + if ((battle_config.skill_add_heal_rate & 2) == 0) + bonus = 0; + break; + case AM_POTIONPITCHER: + if ((battle_config.skill_add_heal_rate & 4) == 0) + bonus = 0; + break; + case CR_SLIMPITCHER: + if ((battle_config.skill_add_heal_rate & 8) == 0) + bonus = 0; + break; + case BA_APPLEIDUN: + if ((battle_config.skill_add_heal_rate & 16) == 0) + bonus = 0; + break; + case AB_HIGHNESSHEAL: + if ((battle_config.skill_add_heal_rate & 32) == 0) + bonus = 0; + break; } } ARR_FIND(0, ARRAYLENGTH(sd->skillheal), i, sd->skillheal[i].id == skill_id); - if( i < ARRAYLENGTH(sd->skillheal) ) + if (i < ARRAYLENGTH(sd->skillheal)) bonus += sd->skillheal[i].val; return bonus; @@ -7733,7 +7747,8 @@ void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int h if( sd->status.ele_id > 0 ) elemental->set_target(sd,src); - sd->canlog_tick = timer->gettick(); + if (battle_config.prevent_logout_trigger & PLT_DAMAGE) + sd->canlog_tick = timer->gettick(); } /*========================================== diff --git a/src/map/pc.h b/src/map/pc.h index 0e4f1affd..482e30c41 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -73,6 +73,14 @@ enum equip_index { EQI_MAX }; +enum prevent_logout_trigger { + PLT_NONE = 0x0, + PLT_LOGIN = 0x1, + PLT_ATTACK = 0x2, + PLT_SKILL = 0x4, + PLT_DAMAGE = 0x8 +}; + enum pc_unequipitem_flag { PCUNEQUIPITEM_NONE = 0x0, ///< Just unequip PCUNEQUIPITEM_RECALC = 0x1, ///< Recalculate status after unequipping diff --git a/src/map/script.c b/src/map/script.c index 61022252f..d1806cb41 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -17751,6 +17751,1592 @@ BUILDIN(getunittype) { return true; } +/** + * Sets real-time unit data for a game object. + * Setunitdata <GUID>,<DataType>,<Val1>{,<Val2>,<Val3>} + * @param1 GUID GID of the unit. + * @param2 DataType Type of Data to be set for the unit. + * @param3 Value#1 Value to be passed as change in data. + * @param4 Value#2 Optional int value to be passed for certain data types. + * @param5 Value#3 Optional int value to be passed for certain data types. + * @return 1 on success, 0 on failure. + */ +BUILDIN(setunitdata) +{ + struct block_list *bl = NULL; + const char *mapname = NULL, *udtype = NULL; + int type = 0, val = 0, val2 = 0, val3 = 0; + struct map_session_data *tsd = NULL; + + bl = map->id2bl(script_getnum(st, 2)); + + if (bl == NULL) { + ShowWarning("buildin_setunitdata: Error in finding object with given GID %d!\n", script_getnum(st, 2)); + script_pushint(st, 0); + return false; + } + + type = script_getnum(st, 3); + + /* type bounds */ + if (type < UDT_SIZE || type >= UDT_MAX) { // Note: UDT_TYPE is not valid here + ShowError("buildin_setunitdata: Invalid unit data type %d provided.\n", type); + script_pushint(st, 0); + return false; + } + + /* Mandatory Argument 3 */ + if (type == UDT_MAPIDXY) { + if (!script_isstringtype(st, 4)) { + ShowError("buildin_setunitdata: Invalid data type for argument #3.\n"); + script_pushint(st, 0); + return false; + } + mapname = script_getstr(st, 4); + } else { + if (script_isstringtype(st, 4)) { + ShowError("buildin_setunitdata: Invalid data type for argument #3.\n"); + script_pushint(st, 0); + return false; + } + val = script_getnum(st, 4); + } +/* checks if value is out of bounds. */ +#define setunitdata_check_bounds(arg, min, max) \ + do { \ + if (script_getnum(st, (arg)) < (min) || script_getnum(st, (arg)) > (max)) { \ + ShowError("buildin_setunitdata: Invalid value %d for argument #%d. (min: %d, max: %d)\n", script_getnum(st, (arg)), (arg)-1, (min), (max)); \ + script_pushint(st, 0); \ + return false; \ + } \ + } while(0); +/* checks if value is out of bounds. */ +#define setunitdata_check_min(arg, min) \ + do { \ + if (script_getnum(st, (arg)) < (min)) { \ + ShowError("buildin_setunitdata: Invalid value %d for argument #%d. (min: %d)\n", script_getnum(st, (arg)), (arg)-1, (min)); \ + script_pushint(st, 0); \ + return false; \ + } \ + } while(0); +/* checks if the argument doesn't exist, if required. + * also checks if the argument exists, if not required. */ +#define setunitdata_assert_arg(arg, required) \ + do { \ + if (required && !script_hasdata(st, (arg))) { \ + ShowError("buildin_setunitdata: Type %d reqires argument #%d.\n", type, (arg)-1); \ + script_pushint(st, 0); \ + return false; \ + } else if (!required && script_hasdata(st, arg)) { \ + ShowError("buildin_setunitdata: Argument %d is not required for type %d.\n", (arg)-1, type); \ + script_pushint(st, 0); \ + return false; \ + } \ + } while (0); +/* checks if the data is an integer. */ +#define setunitdata_check_int(arg) \ + do { \ + setunitdata_assert_arg((arg), true); \ + if (script_isstringtype(st, (arg))) { \ + ShowError("buildin_setunitdata: Argument #%d expects integer, string given.\n", (arg)-1); \ + script_pushint(st, 0); \ + return false; \ + } \ + } while(0); +/* checks if the data is a string. */ +#define setunitdata_check_string(arg) \ + do { \ + setunitdata_assert_arg((arg), true); \ + if (script_isinttype(st, (arg))) { \ + ShowError("buildin_setunitdata: Argument #%d expects string, integer given.\n", (arg)-1); \ + script_pushint(st, 0); \ + return false; \ + } \ + } while(0); + + if (type != UDT_MAPIDXY && type != UDT_WALKTOXY) { + setunitdata_assert_arg(5, false); + setunitdata_assert_arg(6, false); + } + + switch (type) + { + case UDT_SIZE: + setunitdata_check_bounds(4, SZ_SMALL, SZ_BIG); + break; + case UDT_LEVEL: + case UDT_HP: + case UDT_MAXHP: + case UDT_SP: + case UDT_MAXSP: + case UDT_CLASS: + case UDT_HEADBOTTOM: + case UDT_HEADMIDDLE: + case UDT_HEADTOP: + case UDT_CLOTHCOLOR: + case UDT_SHIELD: + case UDT_WEAPON: + case UDT_INTIMACY: + case UDT_LIFETIME: + case UDT_MERC_KILLCOUNT: + setunitdata_check_min(4, 0); + break; + case UDT_MASTERAID: + setunitdata_check_min(4, 0); + tsd = map->id2sd(val); + if (tsd == NULL) { + ShowWarning("buildin_setunitdata: Account ID %d not found for master change!\n",val); + script_pushint(st, 0); + return false; + } + break; + case UDT_MASTERCID: + setunitdata_check_min(4, 0); + tsd = map->charid2sd(val); + if (tsd == NULL) { + ShowWarning("buildin_setunitdata: Character ID %d not found for master change!\n",val); + script_pushint(st, 0); + return false; + } + break; + case UDT_MAPIDXY: + if ((val = map->mapname2mapid(mapname)) == -1) { + ShowError("buildin_setunitdata: Non-existent map %s provided.\n", mapname); + return false; + } + setunitdata_check_int(5); + setunitdata_check_int(6); + setunitdata_check_bounds(5, 0, MAX_MAP_SIZE/2); + setunitdata_check_bounds(6, 0, MAX_MAP_SIZE/2); + val2 = script_getnum(st, 5); + val3 = script_getnum(st, 6); + break; + case UDT_WALKTOXY: + setunitdata_assert_arg(6, false); + setunitdata_check_int(5); + val2 = script_getnum(st, 5); + setunitdata_check_bounds(4, 0, MAX_MAP_SIZE/2); + setunitdata_check_bounds(5, 0, MAX_MAP_SIZE/2); + break; + case UDT_SPEED: + setunitdata_check_bounds(4, 0, MAX_WALK_SPEED); + break; + case UDT_MODE: + setunitdata_check_bounds(4, MD_NONE, MD_MASK); + break; + case UDT_AI: + setunitdata_check_bounds(4, AI_NONE, AI_MAX-1); + break; + case UDT_SCOPTION: + setunitdata_check_bounds(4, OPTION_NOTHING, OPTION_COSTUME); + break; + case UDT_SEX: + setunitdata_check_bounds(4, SEX_FEMALE, SEX_MALE); + break; + case UDT_HAIRSTYLE: + setunitdata_check_bounds(4, 0, battle->bc->max_hair_style); + break; + case UDT_HAIRCOLOR: + setunitdata_check_bounds(4, 0, battle->bc->max_hair_color); + break; + case UDT_LOOKDIR: + setunitdata_check_bounds(4, 0, 7); + break; + case UDT_CANMOVETICK: + setunitdata_check_min(4, 0); + break; + case UDT_STR: + case UDT_AGI: + case UDT_VIT: + case UDT_INT: + case UDT_DEX: + case UDT_LUK: + case UDT_STATPOINT: + case UDT_ATKRANGE: + case UDT_ATKMIN: + case UDT_ATKMAX: + case UDT_MATKMIN: + case UDT_MATKMAX: + case UDT_AMOTION: + case UDT_ADELAY: + case UDT_DMOTION: + setunitdata_check_bounds(4, 0, USHRT_MAX); + break; + case UDT_DEF: + case UDT_MDEF: + case UDT_HIT: + case UDT_FLEE: + case UDT_PDODGE: + case UDT_CRIT: + setunitdata_check_bounds(4, 0, SHRT_MAX); + break; + case UDT_HUNGER: + setunitdata_check_bounds(4, 0, 99); + break; + case UDT_RACE: + case UDT_ELETYPE: + case UDT_ELELEVEL: + setunitdata_check_bounds(4, 0, CHAR_MAX); + break; + default: + break; + } + +#undef setunitdata_check_bounds +#undef setunitdata_assert_arg +#undef setunitdata_check_int +#undef setunitdata_check_string + + /* Set the values */ + switch (bl->type) { + case BL_MOB: + { + struct mob_data *md = BL_UCAST(BL_MOB, bl); + nullpo_retr(false, md); + + switch (type) + { + case UDT_SIZE: + md->status.size = (unsigned char) val; + break; + case UDT_LEVEL: + md->level = val; + break; + case UDT_HP: + status->set_hp(bl, (unsigned int) val, 0); + clif->charnameack(0, &md->bl); + break; + case UDT_MAXHP: + md->status.max_hp = (unsigned int) val; + clif->charnameack(0, &md->bl); + break; + case UDT_SP: + status->set_sp(bl, (unsigned int) val, 0); + break; + case UDT_MAXSP: + md->status.max_sp = (unsigned int) val; + break; + case UDT_MASTERAID: + md->master_id = val; + break; + case UDT_MAPIDXY: + unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); + break; + case UDT_WALKTOXY: + if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + unit->movepos(bl, (short) val, (short) val2, 0, 0); + break; + case UDT_SPEED: + md->status.speed = (unsigned short) val; + status->calc_misc(bl, &md->status, md->level); + break; + case UDT_MODE: + md->status.mode = (enum e_mode) val; + break; + case UDT_AI: + md->special_state.ai = (enum ai) val; + break; + case UDT_SCOPTION: + md->sc.option = (unsigned int) val; + break; + case UDT_SEX: + md->vd->sex = (char) val; + break; + case UDT_CLASS: + mob->class_change(md, val); + break; + case UDT_HAIRSTYLE: + clif->changelook(bl, LOOK_HAIR, val); + break; + case UDT_HAIRCOLOR: + clif->changelook(bl, LOOK_HAIR_COLOR, val); + break; + case UDT_HEADBOTTOM: + clif->changelook(bl, LOOK_HEAD_BOTTOM, val); + break; + case UDT_HEADMIDDLE: + clif->changelook(bl, LOOK_HEAD_MID, val); + break; + case UDT_HEADTOP: + clif->changelook(bl, LOOK_HEAD_TOP, val); + break; + case UDT_CLOTHCOLOR: + clif->changelook(bl, LOOK_CLOTHES_COLOR, val); + break; + case UDT_SHIELD: + clif->changelook(bl, LOOK_SHIELD, val); + break; + case UDT_WEAPON: + clif->changelook(bl, LOOK_WEAPON, val); + break; + case UDT_LOOKDIR: + unit->setdir(bl, (uint8) val); + break; + case UDT_CANMOVETICK: + md->ud.canmove_tick = val; + break; + case UDT_STR: + md->status.str = (unsigned short) val; + status->calc_misc(bl, &md->status, md->level); + break; + case UDT_AGI: + md->status.agi = (unsigned short) val; + status->calc_misc(bl, &md->status, md->level); + break; + case UDT_VIT: + md->status.vit = (unsigned short) val; + status->calc_misc(bl, &md->status, md->level); + break; + case UDT_INT: + md->status.int_ = (unsigned short) val; + status->calc_misc(bl, &md->status, md->level); + break; + case UDT_DEX: + md->status.dex = (unsigned short) val; + status->calc_misc(bl, &md->status, md->level); + break; + case UDT_LUK: + md->status.luk = (unsigned short) val; + status->calc_misc(bl, &md->status, md->level); + break; + case UDT_ATKRANGE: + md->status.rhw.range = (unsigned short) val; + break; + case UDT_ATKMIN: + md->status.rhw.atk = (unsigned short) val; + break; + case UDT_ATKMAX: + md->status.rhw.atk2 = (unsigned short) val; + break; + case UDT_MATKMIN: + md->status.matk_min = (unsigned short) val; + break; + case UDT_MATKMAX: + md->status.matk_max = (unsigned short) val; + break; + case UDT_DEF: + md->status.def = (defType) val; + break; + case UDT_MDEF: + md->status.mdef = (defType) val; + break; + case UDT_HIT: + md->status.hit = (short) val; + break; + case UDT_FLEE: + md->status.flee = (short) val; + break; + case UDT_PDODGE: + md->status.flee2 = (short) val; + break; + case UDT_CRIT: + md->status.cri = (short) val; + break; + case UDT_RACE: + md->status.race = (unsigned char) val; + break; + case UDT_ELETYPE: + md->status.def_ele = (unsigned char) val; + break; + case UDT_ELELEVEL: + md->status.ele_lv = (unsigned char) val; + break; + case UDT_AMOTION: + md->status.amotion = (unsigned short) val; + break; + case UDT_ADELAY: + md->status.adelay = (unsigned short) val; + break; + case UDT_DMOTION: + md->status.dmotion = (unsigned short) val; + break; + default: + ShowWarning("buildin_setunitdata: Invalid data type '%s' for mob unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + case BL_HOM: + { + struct homun_data *hd = BL_UCAST(BL_HOM, bl); + + nullpo_retr(false, hd); + + switch (type) + { + case UDT_SIZE: + hd->base_status.size = (unsigned char) val; + break; + case UDT_LEVEL: + hd->homunculus.level = (short) val; + break; + case UDT_HP: + status->set_hp(bl, (unsigned int) val, 0); + break; + case UDT_MAXHP: + hd->homunculus.max_hp = val; + break; + case UDT_SP: + status->set_sp(bl, (unsigned int) val, 0); + break; + case UDT_MAXSP: + hd->homunculus.max_sp = val; + break; + case UDT_MASTERCID: + hd->homunculus.char_id = val; + hd->master = tsd; + break; + case UDT_MAPIDXY: + unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); + break; + case UDT_WALKTOXY: + if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + unit->movepos(bl, (short) val, (short) val2, 0, 0); + break; + case UDT_SPEED: + hd->base_status.speed = (unsigned short) val; + status->calc_misc(bl, &hd->base_status, hd->homunculus.level); + break; + case UDT_LOOKDIR: + unit->setdir(bl, (unsigned char) val); + break; + case UDT_CANMOVETICK: + hd->ud.canmove_tick = val; + break; + case UDT_STR: + hd->base_status.str = (unsigned short) val; + status->calc_misc(bl, &hd->base_status, hd->homunculus.level); + break; + case UDT_AGI: + hd->base_status.agi = (unsigned short) val; + status->calc_misc(bl, &hd->base_status, hd->homunculus.level); + break; + case UDT_VIT: + hd->base_status.vit = (unsigned short) val; + status->calc_misc(bl, &hd->base_status, hd->homunculus.level); + break; + case UDT_INT: + hd->base_status.int_ = (unsigned short) val; + status->calc_misc(bl, &hd->base_status, hd->homunculus.level); + break; + case UDT_DEX: + hd->base_status.dex = (unsigned short) val; + status->calc_misc(bl, &hd->base_status, hd->homunculus.level); + break; + case UDT_LUK: + hd->base_status.luk = (unsigned short) val; + status->calc_misc(bl, &hd->base_status, hd->homunculus.level); + break; + case UDT_ATKRANGE: + hd->base_status.rhw.range = (unsigned short) val; + break; + case UDT_ATKMIN: + hd->base_status.rhw.atk = (unsigned short) val; + break; + case UDT_ATKMAX: + hd->base_status.rhw.atk2 = (unsigned short) val; + break; + case UDT_MATKMIN: + hd->base_status.matk_min = (unsigned short) val; + break; + case UDT_MATKMAX: + hd->base_status.matk_max = (unsigned short) val; + break; + case UDT_DEF: + hd->base_status.def = (defType) val; + break; + case UDT_MDEF: + hd->base_status.mdef = (defType) val; + break; + case UDT_HIT: + hd->base_status.hit = (short) val; + break; + case UDT_FLEE: + hd->base_status.flee = (short) val; + break; + case UDT_PDODGE: + hd->base_status.flee2 = (short) val; + break; + case UDT_CRIT: + hd->base_status.cri = (short) val; + break; + case UDT_RACE: + hd->base_status.race = (unsigned char) val; + break; + case UDT_ELETYPE: + hd->base_status.def_ele = (unsigned char) val; + break; + case UDT_ELELEVEL: + hd->base_status.ele_lv = (unsigned char) val; + break; + case UDT_AMOTION: + hd->base_status.amotion = (unsigned short) val; + break; + case UDT_ADELAY: + hd->base_status.adelay = (unsigned short) val; + break; + case UDT_DMOTION: + hd->base_status.dmotion = (unsigned short) val; + break; + case UDT_HUNGER: + hd->homunculus.hunger = (short) val; + clif->send_homdata(hd->master, SP_HUNGRY, hd->homunculus.hunger); + break; + case UDT_INTIMACY: + homun->add_intimacy(hd, (unsigned int) val); + clif->send_homdata(hd->master, SP_INTIMATE, hd->homunculus.intimacy / 100); + break; + default: + ShowWarning("buildin_setunitdata: Invalid data type '%s' for homunculus unit.\n", udtype); + script_pushint(st, 0); + return false; + } + + clif->send_homdata(hd->master, SP_ACK, 0); // send homun data + } + break; + case BL_PET: + { + struct pet_data *pd = BL_UCAST(BL_PET, bl); + + nullpo_retr(false, pd); + + switch (type) + { + case UDT_SIZE: + pd->status.size = (unsigned char) val; + break; + case UDT_LEVEL: + pd->pet.level = (short) val; + break; + case UDT_HP: + status->set_hp(bl, (unsigned int) val, 0); + break; + case UDT_MAXHP: + pd->status.max_hp = (unsigned int) val; + break; + case UDT_SP: + status->set_sp(bl, (unsigned int) val, 0); + break; + case UDT_MAXSP: + pd->status.max_sp = (unsigned int) val; + break; + case UDT_MASTERAID: + pd->pet.account_id = val; + pd->msd = tsd; + break; + case UDT_MAPIDXY: + unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); + break; + case UDT_WALKTOXY: + if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + unit->movepos(bl, (short) val, (short) val2, 0, 0); + break; + case UDT_SPEED: + pd->status.speed = (unsigned short) val; + status->calc_misc(bl, &pd->status, pd->pet.level); + break; + case UDT_LOOKDIR: + unit->setdir(bl, (unsigned char) val); + break; + case UDT_CANMOVETICK: + pd->ud.canmove_tick = val; + break; + case UDT_STR: + pd->status.str = (unsigned short) val; + status->calc_misc(bl, &pd->status, pd->pet.level); + break; + case UDT_AGI: + pd->status.agi = (unsigned short) val; + status->calc_misc(bl, &pd->status, pd->pet.level); + break; + case UDT_VIT: + pd->status.vit = (unsigned short) val; + status->calc_misc(bl, &pd->status, pd->pet.level); + break; + case UDT_INT: + pd->status.int_ = (unsigned short) val; + status->calc_misc(bl, &pd->status, pd->pet.level); + break; + case UDT_DEX: + pd->status.dex = (unsigned short) val; + status->calc_misc(bl, &pd->status, pd->pet.level); + break; + case UDT_LUK: + pd->status.luk = (unsigned short) val; + status->calc_misc(bl, &pd->status, pd->pet.level); + break; + case UDT_ATKRANGE: + pd->status.rhw.range = (unsigned short) val; + break; + case UDT_ATKMIN: + pd->status.rhw.atk = (unsigned short) val; + break; + case UDT_ATKMAX: + pd->status.rhw.atk2 = (unsigned short) val; + break; + case UDT_MATKMIN: + pd->status.matk_min = (unsigned short) val; + break; + case UDT_MATKMAX: + pd->status.matk_max = (unsigned short) val; + break; + case UDT_DEF: + pd->status.def = (defType) val; + break; + case UDT_MDEF: + pd->status.mdef = (defType) val; + break; + case UDT_HIT: + pd->status.hit = (short) val; + break; + case UDT_FLEE: + pd->status.flee = (short) val; + break; + case UDT_PDODGE: + pd->status.flee2 = (short) val; + break; + case UDT_CRIT: + pd->status.cri = (short) val; + break; + case UDT_RACE: + pd->status.race = (unsigned char) val; + break; + case UDT_ELETYPE: + pd->status.def_ele = (unsigned char) val; + break; + case UDT_ELELEVEL: + pd->status.ele_lv = (unsigned char) val; + break; + case UDT_AMOTION: + pd->status.amotion = (unsigned short) val; + break; + case UDT_ADELAY: + pd->status.adelay = (unsigned short) val; + break; + case UDT_DMOTION: + pd->status.dmotion = (unsigned short) val; + break; + case UDT_INTIMACY: + pet->set_intimate(pd, val); + clif->send_petdata(pd->msd, pd, 1, pd->pet.intimate); + break; + case UDT_HUNGER: + pd->pet.hungry = (short) val; + break; + default: + ShowWarning("buildin_setunitdata: Invalid data type '%s' for pet unit.\n", udtype); + script_pushint(st, 0); + return false; + } + clif->send_petstatus(pd->msd); // send pet data + } + break; + case BL_MER: + { + struct mercenary_data *mc = BL_UCAST(BL_MER, bl); + + nullpo_retr(false, mc); + + switch (type) + { + case UDT_SIZE: + mc->base_status.size = (unsigned char) val; + break; + case UDT_HP: + status->set_hp(bl, (unsigned int) val, 0); + break; + case UDT_MAXHP: + mc->base_status.max_hp = (unsigned int) val; + break; + case UDT_SP: + status->set_sp(bl, (unsigned int) val, 0); + break; + case UDT_MAXSP: + mc->base_status.max_sp = (unsigned int) val; + break; + case UDT_MASTERCID: + mc->mercenary.char_id = val; + break; + case UDT_MAPIDXY: + unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); + break; + case UDT_WALKTOXY: + if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + unit->movepos(bl, (short) val, (short) val2, 0, 0); + break; + case UDT_SPEED: + mc->base_status.size = (unsigned char) val; + status->calc_misc(bl, &mc->base_status, mc->db->lv); + break; + case UDT_LOOKDIR: + unit->setdir(bl, (unsigned char) val); + break; + case UDT_CANMOVETICK: + mc->ud.canmove_tick = val; + break; + case UDT_STR: + mc->base_status.str = (unsigned short) val; + status->calc_misc(bl, &mc->base_status, mc->db->lv); + break; + case UDT_AGI: + mc->base_status.agi = (unsigned short) val; + status->calc_misc(bl, &mc->base_status, mc->db->lv); + break; + case UDT_VIT: + mc->base_status.vit = (unsigned short) val; + status->calc_misc(bl, &mc->base_status, mc->db->lv); + break; + case UDT_INT: + mc->base_status.int_ = (unsigned short) val; + status->calc_misc(bl, &mc->base_status, mc->db->lv); + break; + case UDT_DEX: + mc->base_status.dex = (unsigned short) val; + status->calc_misc(bl, &mc->base_status, mc->db->lv); + break; + case UDT_LUK: + mc->base_status.luk = (unsigned short) val; + status->calc_misc(bl, &mc->base_status, mc->db->lv); + break; + case UDT_ATKRANGE: + mc->base_status.rhw.range = (unsigned short) val; + break; + case UDT_ATKMIN: + mc->base_status.rhw.atk = (unsigned short) val; + break; + case UDT_ATKMAX: + mc->base_status.rhw.atk2 = (unsigned short) val; + break; + case UDT_MATKMIN: + mc->base_status.matk_min = (unsigned short) val; + break; + case UDT_MATKMAX: + mc->base_status.matk_max = (unsigned short) val; + break; + case UDT_DEF: + mc->base_status.def = (defType) val; + break; + case UDT_MDEF: + mc->base_status.mdef = (defType) val; + break; + case UDT_HIT: + mc->base_status.hit = (short) val; + break; + case UDT_FLEE: + mc->base_status.flee = (short) val; + break; + case UDT_PDODGE: + mc->base_status.flee2 = (short) val; + break; + case UDT_CRIT: + mc->base_status.cri = (short) val; + break; + case UDT_RACE: + mc->base_status.race = (unsigned char) val; + break; + case UDT_ELETYPE: + mc->base_status.def_ele = (unsigned char) val; + break; + case UDT_ELELEVEL: + mc->base_status.ele_lv = (unsigned char) val; + break; + case UDT_AMOTION: + mc->base_status.amotion = (unsigned short) val; + break; + case UDT_ADELAY: + mc->base_status.adelay = (unsigned short) val; + break; + case UDT_DMOTION: + mc->base_status.dmotion = (unsigned short) val; + break; + case UDT_MERC_KILLCOUNT: + mc->mercenary.kill_count = (unsigned int) val; + break; + case UDT_LIFETIME: + mc->mercenary.life_time = (unsigned int) val; + break; + default: + ShowWarning("buildin_setunitdata: Invalid data type '%s' for mercenary unit.\n", udtype); + script_pushint(st, 0); + return false; + } + + clif->mercenary_info(map->charid2sd(mc->mercenary.char_id)); + clif->mercenary_skillblock(map->charid2sd(mc->mercenary.char_id)); + } + break; + case BL_ELEM: + { + struct elemental_data *ed = BL_UCAST(BL_ELEM, bl); + + nullpo_retr(false, ed); + + switch (type) + { + case UDT_SIZE: + ed->base_status.size = (unsigned char) val; + break; + case UDT_HP: + status->set_hp(bl, (unsigned int) val, 0); + break; + case UDT_MAXHP: + ed->base_status.max_hp = (unsigned int) val; + break; + case UDT_SP: + status->set_sp(bl, (unsigned int) val, 0); + break; + case UDT_MAXSP: + ed->base_status.max_sp = (unsigned int) val; + break; + case UDT_MASTERCID: + ed->elemental.char_id = val; + break; + case UDT_MAPIDXY: + unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); + break; + case UDT_WALKTOXY: + if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + unit->movepos(bl, (short) val, (short) val2, 0, 0); + break; + case UDT_SPEED: + ed->base_status.speed = (unsigned short) val; + status->calc_misc(bl, &ed->base_status, ed->db->lv); + break; + case UDT_LOOKDIR: + unit->setdir(bl, (unsigned char) val); + break; + case UDT_CANMOVETICK: + ed->ud.canmove_tick = val; + break; + case UDT_STR: + ed->base_status.str = (unsigned short) val; + status->calc_misc(bl, &ed->base_status, ed->db->lv); + break; + case UDT_AGI: + ed->base_status.agi = (unsigned short) val; + status->calc_misc(bl, &ed->base_status, ed->db->lv); + break; + case UDT_VIT: + ed->base_status.vit = (unsigned short) val; + status->calc_misc(bl, &ed->base_status, ed->db->lv); + break; + case UDT_INT: + ed->base_status.int_ = (unsigned short) val; + status->calc_misc(bl, &ed->base_status, ed->db->lv); + break; + case UDT_DEX: + ed->base_status.dex = (unsigned short) val; + status->calc_misc(bl, &ed->base_status, ed->db->lv); + break; + case UDT_LUK: + ed->base_status.luk = (unsigned short) val; + status->calc_misc(bl, &ed->base_status, ed->db->lv); + break; + case UDT_ATKRANGE: + ed->base_status.rhw.range = (unsigned short) val; + break; + case UDT_ATKMIN: + ed->base_status.rhw.atk = (unsigned short) val; + break; + case UDT_ATKMAX: + ed->base_status.rhw.atk2 = (unsigned short) val; + break; + case UDT_MATKMIN: + ed->base_status.matk_min = (unsigned short) val; + break; + case UDT_MATKMAX: + ed->base_status.matk_max = (unsigned short) val; + break; + case UDT_DEF: + ed->base_status.def = (defType) val; + break; + case UDT_MDEF: + ed->base_status.mdef = (defType) val; + break; + case UDT_HIT: + ed->base_status.hit = (short) val; + break; + case UDT_FLEE: + ed->base_status.flee = (short) val; + break; + case UDT_PDODGE: + ed->base_status.flee2 = (short) val; + break; + case UDT_CRIT: + ed->base_status.cri = (short) val; + break; + case UDT_RACE: + ed->base_status.race = (unsigned char) val; + break; + case UDT_ELETYPE: + ed->base_status.def_ele = (unsigned char) val; + break; + case UDT_ELELEVEL: + ed->base_status.ele_lv = (unsigned char) val; + break; + case UDT_AMOTION: + ed->base_status.amotion = (unsigned short) val; + break; + case UDT_ADELAY: + ed->base_status.adelay = (unsigned short) val; + break; + case UDT_DMOTION: + ed->base_status.dmotion = (unsigned short) val; + break; + case UDT_LIFETIME: + ed->elemental.life_time = val; + break; + default: + ShowWarning("buildin_setunitdata: Invalid data type '%s' for elemental unit.\n", udtype); + script_pushint(st, 0); + return false; + } + clif->elemental_info(ed->master); + } + break; + case BL_NPC: + { + struct npc_data *nd = BL_UCAST(BL_NPC, bl); + + nullpo_retr(false, nd); + + switch (type) + { + case UDT_SIZE: + nd->status.size = (unsigned char) val; + break; + case UDT_LEVEL: + nd->level = (unsigned short) val; + break; + case UDT_HP: + status->set_hp(bl, (unsigned int) val, 0); + break; + case UDT_MAXHP: + nd->status.max_hp = (unsigned int) val; + break; + case UDT_SP: + status->set_sp(bl, (unsigned int) val, 0); + break; + case UDT_MAXSP: + nd->status.max_sp = (unsigned int) val; + break; + case UDT_MAPIDXY: + unit->warp(bl, (short) val, (short) val2, (short) val3, CLR_TELEPORT); + break; + case UDT_WALKTOXY: + if (!unit->walktoxy(bl, (short) val, (short) val2, 2)) + unit->movepos(bl, (short) val, (short) val2, 0, 0); + break; + case UDT_CLASS: + npc->setclass(nd, (short) val); + break; + case UDT_SPEED: + nd->speed = (short) val; + status->calc_misc(bl, &nd->status, nd->level); + break; + case UDT_LOOKDIR: + unit->setdir(bl, (unsigned char) val); + break; + case UDT_STR: + nd->status.str = (unsigned short) val; + status->calc_misc(bl, &nd->status, nd->level); + break; + case UDT_AGI: + nd->status.agi = (unsigned short) val; + status->calc_misc(bl, &nd->status, nd->level); + break; + case UDT_VIT: + nd->status.vit = (unsigned short) val; + status->calc_misc(bl, &nd->status, nd->level); + break; + case UDT_INT: + nd->status.int_ = (unsigned short) val; + status->calc_misc(bl, &nd->status, nd->level); + break; + case UDT_DEX: + nd->status.dex = (unsigned short) val; + status->calc_misc(bl, &nd->status, nd->level); + break; + case UDT_LUK: + nd->status.luk = (unsigned short) val; + status->calc_misc(bl, &nd->status, nd->level); + break; + case UDT_STATPOINT: + nd->stat_point = (unsigned short) val; + break; + case UDT_ATKRANGE: + nd->status.rhw.range = (unsigned short) val; + break; + case UDT_ATKMIN: + nd->status.rhw.atk = (unsigned short) val; + break; + case UDT_ATKMAX: + nd->status.rhw.atk2 = (unsigned short) val; + break; + case UDT_MATKMIN: + nd->status.matk_min = (unsigned short) val; + break; + case UDT_MATKMAX: + nd->status.matk_max = (unsigned short) val; + break; + case UDT_DEF: + nd->status.def = (defType) val; + break; + case UDT_MDEF: + nd->status.mdef = (defType) val; + break; + case UDT_HIT: + nd->status.hit = (short) val; + break; + case UDT_FLEE: + nd->status.flee = (short) val; + break; + case UDT_PDODGE: + nd->status.flee2 = (short) val; + break; + case UDT_CRIT: + nd->status.cri = (short) val; + break; + case UDT_RACE: + nd->status.race = (unsigned char) val; + break; + case UDT_ELETYPE: + nd->status.def_ele = (unsigned char) val; + break; + case UDT_ELELEVEL: + nd->status.ele_lv = (unsigned char) val; + break; + case UDT_AMOTION: + nd->status.amotion = (unsigned short) val; + break; + case UDT_ADELAY: + nd->status.adelay = (unsigned short) val; + break; + case UDT_DMOTION: + nd->status.dmotion = (unsigned short) val; + break; + default: + ShowWarning("buildin_setunitdata: Invalid data type '%s' for NPC unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + default: + ShowError("buildin_setunitdata: Unknown object!\n"); + script_pushint(st, 0); + return false; + } // end of bl->type switch + + script_pushint(st, 1); + return true; +} + +/** + * Retrieves real-time data for a game object. + * Getunitdata <GUID>,<DataType>{,<Variable>} + * @param1 GUID Game object unique Id. + * @param2 DataType Type of Data to be set for the unit. + * @param3 Variable array reference to store data into. (used for UDT_MAPIDXY) + * @return 0 on failure, <value> on success + */ +BUILDIN(getunitdata) +{ + struct block_list *bl; + const char *udtype = NULL; + const struct map_session_data *sd = NULL; + int type = 0; + char* name = NULL; + struct script_data *data = script_hasdata(st,4)?script_getdata(st, 4):NULL; + + bl = map->id2bl(script_getnum(st, 2)); + + if (bl == NULL) { + ShowWarning("buildin_getunitdata: Error in finding object with given GID %d!\n", script_getnum(st, 2)); + script_pushint(st, 0); + return false; + } + + type = script_getnum(st, 3); + + /* Type check */ + if (type < UDT_TYPE || type >= UDT_MAX) { + ShowError("buildin_getunitdata: Invalid unit data type %d provided.\n", type); + script_pushint(st, 0); + return false; + } + + /* Argument checks */ + if (type == UDT_MAPIDXY) { + if (data == NULL || !data_isreference(data)) { + ShowWarning("buildin_getunitdata: Error in argument 3. Please provide a reference variable to store values in.\n"); + script_pushint(st, 0); + return false; + } + + name = reference_getname(data); + + if (not_server_variable(*name)) { + sd = script->rid2sd(st); + if (sd == NULL) { + ShowWarning("buildin_getunitdata: Player not attached! Cannot use player variable %s.\n",name); + script_pushint(st, 0); + return true;// no player attached + } + } + } + +#define getunitdata_sub(idx__,var__) script->setd_sub(st,NULL,name,(idx__),(void *)h64BPTRSIZE((int)(var__)),data->ref); + + switch (bl->type) { + case BL_MOB: + { + const struct mob_data *md = BL_UCAST(BL_MOB, bl); + + nullpo_retr(false, md); + + switch (type) + { + case UDT_TYPE: script_pushint(st, BL_MOB); break; + case UDT_SIZE: script_pushint(st, md->status.size); break; + case UDT_LEVEL: script_pushint(st, md->level); break; + case UDT_HP: script_pushint(st, md->status.hp); break; + case UDT_MAXHP: script_pushint(st, md->status.max_hp); break; + case UDT_SP: script_pushint(st, md->status.sp); break; + case UDT_MAXSP: script_pushint(st, md->status.max_sp); break; + case UDT_MAPIDXY: + getunitdata_sub(0, md->bl.m); + getunitdata_sub(1, md->bl.x); + getunitdata_sub(2, md->bl.y); + break; + case UDT_SPEED: script_pushint(st, md->status.speed); break; + case UDT_MODE: script_pushint(st, md->status.mode); break; + case UDT_AI: script_pushint(st, md->special_state.ai); break; + case UDT_SCOPTION: script_pushint(st, md->sc.option); break; + case UDT_SEX: script_pushint(st, md->vd->sex); break; + case UDT_CLASS: script_pushint(st, md->vd->class); break; + case UDT_HAIRSTYLE: script_pushint(st, md->vd->hair_style); break; + case UDT_HAIRCOLOR: script_pushint(st, md->vd->hair_color); break; + case UDT_HEADBOTTOM: script_pushint(st, md->vd->head_bottom); break; + case UDT_HEADMIDDLE: script_pushint(st, md->vd->head_mid); break; + case UDT_HEADTOP: script_pushint(st, md->vd->head_top); break; + case UDT_CLOTHCOLOR: script_pushint(st, md->vd->cloth_color); break; + case UDT_SHIELD: script_pushint(st, md->vd->shield); break; + case UDT_WEAPON: script_pushint(st, md->vd->weapon); break; + case UDT_LOOKDIR: script_pushint(st, md->ud.dir); break; + case UDT_CANMOVETICK: script_pushint(st, md->ud.canmove_tick); break; + case UDT_STR: script_pushint(st, md->status.str); break; + case UDT_AGI: script_pushint(st, md->status.agi); break; + case UDT_VIT: script_pushint(st, md->status.vit); break; + case UDT_INT: script_pushint(st, md->status.int_); break; + case UDT_DEX: script_pushint(st, md->status.dex); break; + case UDT_LUK: script_pushint(st, md->status.luk); break; + case UDT_ATKRANGE: script_pushint(st, md->status.rhw.range); break; + case UDT_ATKMIN: script_pushint(st, md->status.rhw.atk); break; + case UDT_ATKMAX: script_pushint(st, md->status.rhw.atk2); break; + case UDT_MATKMIN: script_pushint(st, md->status.matk_min); break; + case UDT_MATKMAX: script_pushint(st, md->status.matk_max); break; + case UDT_DEF: script_pushint(st, md->status.def); break; + case UDT_MDEF: script_pushint(st, md->status.mdef); break; + case UDT_HIT: script_pushint(st, md->status.hit); break; + case UDT_FLEE: script_pushint(st, md->status.flee); break; + case UDT_PDODGE: script_pushint(st, md->status.flee2); break; + case UDT_CRIT: script_pushint(st, md->status.cri); break; + case UDT_RACE: script_pushint(st, md->status.race); break; + case UDT_ELETYPE: script_pushint(st, md->status.def_ele); break; + case UDT_ELELEVEL: script_pushint(st, md->status.ele_lv); break; + case UDT_AMOTION: script_pushint(st, md->status.amotion); break; + case UDT_ADELAY: script_pushint(st, md->status.adelay); break; + case UDT_DMOTION: script_pushint(st, md->status.dmotion); break; + default: + ShowWarning("buildin_getunitdata: Invalid data type '%s' for Mob unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + case BL_HOM: + { + const struct homun_data *hd = BL_UCAST(BL_HOM, bl); + + nullpo_retr(false, hd); + + switch (type) + { + case UDT_TYPE: script_pushint(st, BL_HOM); break; + case UDT_SIZE: script_pushint(st, hd->base_status.size); break; + case UDT_LEVEL: script_pushint(st, hd->homunculus.level); break; + case UDT_HP: script_pushint(st, hd->base_status.hp); break; + case UDT_MAXHP: script_pushint(st, hd->base_status.max_hp); break; + case UDT_SP: script_pushint(st, hd->base_status.sp); break; + case UDT_MAXSP: script_pushint(st, hd->base_status.max_sp); break; + case UDT_MAPIDXY: + getunitdata_sub(0, hd->bl.m); + getunitdata_sub(1, hd->bl.x); + getunitdata_sub(2, hd->bl.y); + break; + case UDT_SPEED: script_pushint(st, hd->base_status.speed); break; + case UDT_LOOKDIR: script_pushint(st, hd->ud.dir); break; + case UDT_CANMOVETICK: script_pushint(st, hd->ud.canmove_tick); break; + case UDT_MODE: script_pushint(st, hd->base_status.mode); break; + case UDT_STR: script_pushint(st, hd->base_status.str); break; + case UDT_AGI: script_pushint(st, hd->base_status.agi); break; + case UDT_VIT: script_pushint(st, hd->base_status.vit); break; + case UDT_INT: script_pushint(st, hd->base_status.int_); break; + case UDT_DEX: script_pushint(st, hd->base_status.dex); break; + case UDT_LUK: script_pushint(st, hd->base_status.luk); break; + case UDT_ATKRANGE: script_pushint(st, hd->base_status.rhw.range); break; + case UDT_ATKMIN: script_pushint(st, hd->base_status.rhw.atk); break; + case UDT_ATKMAX: script_pushint(st, hd->base_status.rhw.atk2); break; + case UDT_MATKMIN: script_pushint(st, hd->base_status.matk_min); break; + case UDT_MATKMAX: script_pushint(st, hd->base_status.matk_max); break; + case UDT_DEF: script_pushint(st, hd->base_status.def); break; + case UDT_MDEF: script_pushint(st, hd->base_status.mdef); break; + case UDT_HIT: script_pushint(st, hd->base_status.hit); break; + case UDT_FLEE: script_pushint(st, hd->base_status.flee); break; + case UDT_PDODGE: script_pushint(st, hd->base_status.flee2); break; + case UDT_CRIT: script_pushint(st, hd->base_status.cri); break; + case UDT_RACE: script_pushint(st, hd->base_status.race); break; + case UDT_ELETYPE: script_pushint(st, hd->base_status.def_ele); break; + case UDT_ELELEVEL: script_pushint(st, hd->base_status.ele_lv); break; + case UDT_AMOTION: script_pushint(st, hd->base_status.amotion); break; + case UDT_ADELAY: script_pushint(st, hd->base_status.adelay); break; + case UDT_DMOTION: script_pushint(st, hd->base_status.dmotion); break; + case UDT_MASTERCID: script_pushint(st, hd->homunculus.char_id); break; + case UDT_HUNGER: script_pushint(st, hd->homunculus.hunger); break; + case UDT_INTIMACY: script_pushint(st, hd->homunculus.intimacy); break; + default: + ShowWarning("buildin_getunitdata: Invalid data type '%s' for Homunculus unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + case BL_PET: + { + const struct pet_data *pd = BL_UCAST(BL_PET, bl); + + nullpo_retr(false, pd); + + switch (type) + { + case UDT_TYPE: script_pushint(st, BL_PET); break; + case UDT_SIZE: script_pushint(st, pd->status.size); break; + case UDT_LEVEL: script_pushint(st, pd->pet.level); break; + case UDT_HP: script_pushint(st, pd->status.hp); break; + case UDT_MAXHP: script_pushint(st, pd->status.max_hp); break; + case UDT_SP: script_pushint(st, pd->status.sp); break; + case UDT_MAXSP: script_pushint(st, pd->status.max_sp); break; + case UDT_MAPIDXY: + getunitdata_sub(0, pd->bl.m); + getunitdata_sub(1, pd->bl.x); + getunitdata_sub(2, pd->bl.y); + break; + case UDT_SPEED: script_pushint(st, pd->status.speed); break; + case UDT_LOOKDIR: script_pushint(st, pd->ud.dir); break; + case UDT_CANMOVETICK: script_pushint(st, pd->ud.canmove_tick); break; + case UDT_MODE: script_pushint(st, pd->status.mode); break; + case UDT_STR: script_pushint(st, pd->status.str); break; + case UDT_AGI: script_pushint(st, pd->status.agi); break; + case UDT_VIT: script_pushint(st, pd->status.vit); break; + case UDT_INT: script_pushint(st, pd->status.int_); break; + case UDT_DEX: script_pushint(st, pd->status.dex); break; + case UDT_LUK: script_pushint(st, pd->status.luk); break; + case UDT_ATKRANGE: script_pushint(st, pd->status.rhw.range); break; + case UDT_ATKMIN: script_pushint(st, pd->status.rhw.atk); break; + case UDT_ATKMAX: script_pushint(st, pd->status.rhw.atk2); break; + case UDT_MATKMIN: script_pushint(st, pd->status.matk_min); break; + case UDT_MATKMAX: script_pushint(st, pd->status.matk_max); break; + case UDT_DEF: script_pushint(st, pd->status.def); break; + case UDT_MDEF: script_pushint(st, pd->status.mdef); break; + case UDT_HIT: script_pushint(st, pd->status.hit); break; + case UDT_FLEE: script_pushint(st, pd->status.flee); break; + case UDT_PDODGE: script_pushint(st, pd->status.flee2); break; + case UDT_CRIT: script_pushint(st, pd->status.cri); break; + case UDT_RACE: script_pushint(st, pd->status.race); break; + case UDT_ELETYPE: script_pushint(st, pd->status.def_ele); break; + case UDT_ELELEVEL: script_pushint(st, pd->status.ele_lv); break; + case UDT_AMOTION: script_pushint(st, pd->status.amotion); break; + case UDT_ADELAY: script_pushint(st, pd->status.adelay); break; + case UDT_DMOTION: script_pushint(st, pd->status.dmotion); break; + case UDT_MASTERAID: script_pushint(st, pd->pet.account_id); break; + case UDT_HUNGER: script_pushint(st, pd->pet.hungry); break; + case UDT_INTIMACY: script_pushint(st, pd->pet.intimate); break; + default: + ShowWarning("buildin_getunitdata: Invalid data type '%s' for Pet unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + case BL_MER: + { + const struct mercenary_data *mc = BL_UCAST(BL_MER, bl); + + nullpo_retr(false, mc); + + switch (type) + { + case UDT_TYPE: script_pushint(st, BL_MER); break; + case UDT_SIZE: script_pushint(st, mc->base_status.size); break; + case UDT_HP: script_pushint(st, mc->base_status.hp); break; + case UDT_MAXHP: script_pushint(st, mc->base_status.max_hp); break; + case UDT_SP: script_pushint(st, mc->base_status.sp); break; + case UDT_MAXSP: script_pushint(st, mc->base_status.max_sp); break; + case UDT_MAPIDXY: + getunitdata_sub(0, mc->bl.m); + getunitdata_sub(1, mc->bl.x); + getunitdata_sub(2, mc->bl.y); + break; + case UDT_SPEED: script_pushint(st, mc->base_status.speed); break; + case UDT_LOOKDIR: script_pushint(st, mc->ud.dir); break; + case UDT_CANMOVETICK: script_pushint(st, mc->ud.canmove_tick); break; + case UDT_MODE: script_pushint(st, mc->base_status.mode); break; + case UDT_STR: script_pushint(st, mc->base_status.str); break; + case UDT_AGI: script_pushint(st, mc->base_status.agi); break; + case UDT_VIT: script_pushint(st, mc->base_status.vit); break; + case UDT_INT: script_pushint(st, mc->base_status.int_); break; + case UDT_DEX: script_pushint(st, mc->base_status.dex); break; + case UDT_LUK: script_pushint(st, mc->base_status.luk); break; + case UDT_ATKRANGE: script_pushint(st, mc->base_status.rhw.range); break; + case UDT_ATKMIN: script_pushint(st, mc->base_status.rhw.atk); break; + case UDT_ATKMAX: script_pushint(st, mc->base_status.rhw.atk2); break; + case UDT_MATKMIN: script_pushint(st, mc->base_status.matk_min); break; + case UDT_MATKMAX: script_pushint(st, mc->base_status.matk_max); break; + case UDT_DEF: script_pushint(st, mc->base_status.def); break; + case UDT_MDEF: script_pushint(st, mc->base_status.mdef); break; + case UDT_HIT: script_pushint(st, mc->base_status.hit); break; + case UDT_FLEE: script_pushint(st, mc->base_status.flee); break; + case UDT_PDODGE: script_pushint(st, mc->base_status.flee2); break; + case UDT_CRIT: script_pushint(st, mc->base_status.cri); break; + case UDT_RACE: script_pushint(st, mc->base_status.race); break; + case UDT_ELETYPE: script_pushint(st, mc->base_status.def_ele); break; + case UDT_ELELEVEL: script_pushint(st, mc->base_status.ele_lv); break; + case UDT_AMOTION: script_pushint(st, mc->base_status.amotion); break; + case UDT_ADELAY: script_pushint(st, mc->base_status.adelay); break; + case UDT_DMOTION: script_pushint(st, mc->base_status.dmotion); break; + case UDT_MASTERCID: script_pushint(st, mc->mercenary.char_id); break; + case UDT_MERC_KILLCOUNT: script_pushint(st, mc->mercenary.kill_count); break; + case UDT_LIFETIME: script_pushint(st, mc->mercenary.life_time); break; + default: + ShowWarning("buildin_getunitdata: Invalid data type '%s' for Mercenary unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + case BL_ELEM: + { + const struct elemental_data *ed = BL_UCAST(BL_ELEM, bl); + + nullpo_retr(false, ed); + + switch (type) + { + case UDT_TYPE: script_pushint(st, BL_ELEM); break; + case UDT_SIZE: script_pushint(st, ed->base_status.size); break; + case UDT_HP: script_pushint(st, ed->base_status.hp); break; + case UDT_MAXHP: script_pushint(st, ed->base_status.max_hp); break; + case UDT_SP: script_pushint(st, ed->base_status.sp); break; + case UDT_MAXSP: script_pushint(st, ed->base_status.max_sp); break; + case UDT_MAPIDXY: + getunitdata_sub(0, ed->bl.m); + getunitdata_sub(1, ed->bl.x); + getunitdata_sub(2, ed->bl.y); + break; + case UDT_SPEED: script_pushint(st, ed->base_status.speed); break; + case UDT_LOOKDIR: script_pushint(st, ed->ud.dir); break; + case UDT_CANMOVETICK: script_pushint(st, ed->ud.canmove_tick); break; + case UDT_MODE: script_pushint(st, ed->base_status.mode); break; + case UDT_STR: script_pushint(st, ed->base_status.str); break; + case UDT_AGI: script_pushint(st, ed->base_status.agi); break; + case UDT_VIT: script_pushint(st, ed->base_status.vit); break; + case UDT_INT: script_pushint(st, ed->base_status.int_); break; + case UDT_DEX: script_pushint(st, ed->base_status.dex); break; + case UDT_LUK: script_pushint(st, ed->base_status.luk); break; + case UDT_ATKRANGE: script_pushint(st, ed->base_status.rhw.range); break; + case UDT_ATKMIN: script_pushint(st, ed->base_status.rhw.atk); break; + case UDT_ATKMAX: script_pushint(st, ed->base_status.rhw.atk2); break; + case UDT_MATKMIN: script_pushint(st, ed->base_status.matk_min); break; + case UDT_MATKMAX: script_pushint(st, ed->base_status.matk_max); break; + case UDT_DEF: script_pushint(st, ed->base_status.def); break; + case UDT_MDEF: script_pushint(st, ed->base_status.mdef); break; + case UDT_HIT: script_pushint(st, ed->base_status.hit); break; + case UDT_FLEE: script_pushint(st, ed->base_status.flee); break; + case UDT_PDODGE: script_pushint(st, ed->base_status.flee2); break; + case UDT_CRIT: script_pushint(st, ed->base_status.cri); break; + case UDT_RACE: script_pushint(st, ed->base_status.race); break; + case UDT_ELETYPE: script_pushint(st, ed->base_status.def_ele); break; + case UDT_ELELEVEL: script_pushint(st, ed->base_status.ele_lv); break; + case UDT_AMOTION: script_pushint(st, ed->base_status.amotion); break; + case UDT_ADELAY: script_pushint(st, ed->base_status.adelay); break; + case UDT_DMOTION: script_pushint(st, ed->base_status.dmotion); break; + case UDT_MASTERCID: script_pushint(st, ed->elemental.char_id); break; + default: + ShowWarning("buildin_getunitdata: Invalid data type '%s' for Elemental unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + case BL_NPC: + { + const struct npc_data *nd = BL_UCAST(BL_NPC, bl); + + nullpo_retr(false, nd); + + switch (type) + { + case UDT_TYPE: script_pushint(st, BL_NPC); break; + case UDT_SIZE: script_pushint(st, nd->status.size); break; + case UDT_HP: script_pushint(st, nd->status.hp); break; + case UDT_MAXHP: script_pushint(st, nd->status.max_hp); break; + case UDT_SP: script_pushint(st, nd->status.sp); break; + case UDT_MAXSP: script_pushint(st, nd->status.max_sp); break; + case UDT_MAPIDXY: + getunitdata_sub(0, bl->m); + getunitdata_sub(1, bl->x); + getunitdata_sub(2, bl->y); + break; + case UDT_SPEED: script_pushint(st, nd->status.speed); break; + case UDT_LOOKDIR: script_pushint(st, nd->ud->dir); break; + case UDT_CANMOVETICK: script_pushint(st, nd->ud->canmove_tick); break; + case UDT_MODE: script_pushint(st, nd->status.mode); break; + case UDT_STR: script_pushint(st, nd->status.str); break; + case UDT_AGI: script_pushint(st, nd->status.agi); break; + case UDT_VIT: script_pushint(st, nd->status.vit); break; + case UDT_INT: script_pushint(st, nd->status.int_); break; + case UDT_DEX: script_pushint(st, nd->status.dex); break; + case UDT_LUK: script_pushint(st, nd->status.luk); break; + case UDT_ATKRANGE: script_pushint(st, nd->status.rhw.range); break; + case UDT_ATKMIN: script_pushint(st, nd->status.rhw.atk); break; + case UDT_ATKMAX: script_pushint(st, nd->status.rhw.atk2); break; + case UDT_MATKMIN: script_pushint(st, nd->status.matk_min); break; + case UDT_MATKMAX: script_pushint(st, nd->status.matk_max); break; + case UDT_DEF: script_pushint(st, nd->status.def); break; + case UDT_MDEF: script_pushint(st, nd->status.mdef); break; + case UDT_HIT: script_pushint(st, nd->status.hit); break; + case UDT_FLEE: script_pushint(st, nd->status.flee); break; + case UDT_PDODGE: script_pushint(st, nd->status.flee2); break; + case UDT_CRIT: script_pushint(st, nd->status.cri); break; + case UDT_RACE: script_pushint(st, nd->status.race); break; + case UDT_ELETYPE: script_pushint(st, nd->status.def_ele); break; + case UDT_ELELEVEL: script_pushint(st, nd->status.ele_lv); break; + case UDT_AMOTION: script_pushint(st, nd->status.amotion); break; + case UDT_ADELAY: script_pushint(st, nd->status.adelay); break; + case UDT_DMOTION: script_pushint(st, nd->status.dmotion); break; + default: + ShowWarning("buildin_getunitdata: Invalid data type '%s' for NPC unit.\n", udtype); + script_pushint(st, 0); + return false; + } + } + break; + default: + ShowError("buildin_getunitdata: Unknown object!\n"); + script_pushint(st, 0); + return false; + } // end of bl->type switch + +#undef getunitdata_sub + + return false; +} + +/** + * Gets the name of a Unit. + * Supported types are [MOB|HOM|PET|NPC]. + * MER and ELEM don't support custom names. + * + * @command getunitname <GUID>; + * @param GUID Game Object Unique ID. + * @return boolean or Name of the game object. + */ +BUILDIN(getunitname) +{ + const struct block_list* bl = NULL; + + bl = map->id2bl(script_getnum(st, 2)); + + if (bl == NULL) { + ShowWarning("buildin_getunitname: Error in finding object with given game ID %d!\n", script_getnum(st, 2)); + script_pushconststr(st, "Unknown"); + return false; + } + + script_pushstrcopy(st, status->get_name(bl)); + + return true; +} + +/** + * Changes the name of a bl. + * Supported types are [MOB|HOM|PET]. + * For NPC see 'setnpcdisplay', MER and ELEM don't support custom names. + * + * @command setunitname <GUID>,<name>; + * @param GUID Game object unique ID. + * @param Name as string. + * @return boolean. + */ +BUILDIN(setunitname) +{ + struct block_list* bl = map->id2bl(script_getnum(st, 2)); + + if (bl == NULL) { + ShowWarning("buildin_setunitname: Game object with ID %d was not found!\n", script_getnum(st, 2)); + script_pushint(st, 0); + return false; + } + + switch (bl->type) { + case BL_MOB: + { + struct mob_data *md = BL_UCAST(BL_MOB, bl); + if (md == NULL) { + ShowWarning("buildin_setunitname: Error in finding object BL_MOB!\n"); + script_pushint(st, 0); + return false; + } + safestrncpy(md->name, script_getstr(st, 3), NAME_LENGTH); + } + break; + case BL_HOM: + { + struct homun_data *hd = BL_UCAST(BL_HOM, bl); + if (hd == NULL) { + ShowWarning("buildin_setunitname: Error in finding object BL_HOM!\n"); + script_pushint(st, 0); + return false; + } + safestrncpy(hd->homunculus.name, script_getstr(st, 3), NAME_LENGTH); + } + break; + case BL_PET: + { + struct pet_data *pd = BL_UCAST(BL_PET, bl); + if (pd == NULL) { + ShowWarning("buildin_setunitname: Error in finding object BL_PET!\n"); + script_pushint(st, 0); + return false; + } + safestrncpy(pd->pet.name, script_getstr(st, 3), NAME_LENGTH); + } + break; + default: + script_pushint(st, 0); + ShowWarning("buildin_setunitname: Unknown object type!\n"); + return false; + } + + script_pushint(st, 1); + clif->charnameack(0, bl); // Send update to client. + + return true; +} + /// Makes the unit walk to target position or target id /// Returns if it was successfull /// @@ -19689,12 +21275,16 @@ BUILDIN(makerune) BUILDIN(hascashmount) { struct map_session_data *sd = script->rid2sd(st); + if (sd == NULL) return true; - if( sd->sc.data[SC_ALL_RIDING] ) - script_pushint(st,1); - else - script_pushint(st,0); + + if (sd->sc.data[SC_ALL_RIDING]) { + script_pushint(st, 1); + } else { + script_pushint(st, 0); + } + return true; } @@ -19708,18 +21298,22 @@ BUILDIN(hascashmount) BUILDIN(setcashmount) { struct map_session_data *sd = script->rid2sd(st); + if (sd == NULL) return true; + if (pc_hasmount(sd)) { clif->msgtable(sd, MSG_REINS_CANT_USE_MOUNTED); - script_pushint(st,0);//can't mount with one of these + script_pushint(st, 0); // Can't mount with one of these } else { - if (sd->sc.data[SC_ALL_RIDING]) + if (sd->sc.data[SC_ALL_RIDING]) { status_change_end(&sd->bl, SC_ALL_RIDING, INVALID_TIMER); - else - sc_start(NULL, &sd->bl, SC_ALL_RIDING, 100, 25, INFINITE_DURATION); - script_pushint(st,1);//in both cases, return 1. + } else { + sc_start(NULL, &sd->bl, SC_ALL_RIDING, 100, battle_config.boarding_halter_speed, INFINITE_DURATION); + } + script_pushint(st, 1); // In both cases, return 1. } + return true; } @@ -21864,6 +23458,11 @@ void script_parse_builtin(void) { // <--- [zBuffer] List of player cont commands // [zBuffer] List of mob control commands ---> BUILDIN_DEF(getunittype,"i"), + /* Unit Data */ + BUILDIN_DEF(setunitdata,"iiv??"), + BUILDIN_DEF(getunitdata,"ii?"), + BUILDIN_DEF(getunitname,"i"), + BUILDIN_DEF(setunitname,"is"), BUILDIN_DEF(unitwalk,"ii?"), BUILDIN_DEF(unitkill,"i"), BUILDIN_DEF(unitwarp,"isii"), diff --git a/src/map/script.h b/src/map/script.h index 0c967a94e..8caec961a 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -350,6 +350,81 @@ enum navigation_service { }; /** + * Unit Types for script handling. + */ +enum script_unit_types { + UNIT_PC = 0, + UNIT_NPC, + UNIT_PET, + UNIT_MOB, + UNIT_HOM, + UNIT_MER, + UNIT_ELEM, +}; + +/** + * Unit Data Types for script handling. + */ +enum script_unit_data_types { + UDT_TYPE = 0, + UDT_SIZE, + UDT_LEVEL, + UDT_HP, + UDT_MAXHP, + UDT_SP, + UDT_MAXSP, + UDT_MASTERAID, + UDT_MASTERCID, + UDT_MAPIDXY, + UDT_WALKTOXY, + UDT_SPEED, + UDT_MODE, + UDT_AI, + UDT_SCOPTION, + UDT_SEX, + UDT_CLASS, + UDT_HAIRSTYLE, + UDT_HAIRCOLOR, + UDT_HEADBOTTOM, + UDT_HEADMIDDLE, + UDT_HEADTOP, + UDT_CLOTHCOLOR, + UDT_SHIELD, + UDT_WEAPON, + UDT_LOOKDIR, + UDT_CANMOVETICK, + UDT_STR, + UDT_AGI, + UDT_VIT, + UDT_INT, + UDT_DEX, + UDT_LUK, + UDT_ATKRANGE, + UDT_ATKMIN, + UDT_ATKMAX, + UDT_MATKMIN, + UDT_MATKMAX, + UDT_DEF, + UDT_MDEF, + UDT_HIT, + UDT_FLEE, + UDT_PDODGE, + UDT_CRIT, + UDT_RACE, + UDT_ELETYPE, + UDT_ELELEVEL, + UDT_AMOTION, + UDT_ADELAY, + UDT_DMOTION, + UDT_HUNGER, + UDT_INTIMACY, + UDT_LIFETIME, + UDT_MERC_KILLCOUNT, + UDT_STATPOINT, + UDT_MAX +}; + +/** * Structures **/ diff --git a/src/map/status.h b/src/map/status.h index 6f68c36c3..06e7e07b8 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -1759,10 +1759,10 @@ enum si_type { //SI_HEALTHSTATE_HEAVYPOISON = 890, //SI_HEALTHSTATE_FEAR = 891, //SI_CHERRY_BLOSSOM_CAKE = 892, - SI_SU_STOOP = 893, - SI_CATNIPPOWDER = 894, + SI_SU_STOOP = 893, + SI_CATNIPPOWDER = 894, SI_BLOSSOM_FLUTTERING = 895, - SI_SV_ROOTTWIST = 896, + SI_SV_ROOTTWIST = 896, //SI_ATTACK_PROPERTY_NOTHING = 897, //SI_ATTACK_PROPERTY_WATER = 898, //SI_ATTACK_PROPERTY_GROUND = 899, @@ -1784,11 +1784,11 @@ enum si_type { //SI_RESIST_PROPERTY_DARKNESS = 914, //SI_RESIST_PROPERTY_TELEKINESIS = 915, //SI_RESIST_PROPERTY_UNDEAD = 916, - SI_BITESCAR = 917, - SI_ARCLOUSEDASH = 918, - SI_TUNAPARTY = 919, - SI_SHRIMP = 920, - SI_FRESHSHRIMP = 921, + SI_BITESCAR = 917, + SI_ARCLOUSEDASH = 918, + SI_TUNAPARTY = 919, + SI_SHRIMP = 920, + SI_FRESHSHRIMP = 921, //SI_PERIOD_RECEIVEITEM = 922, //SI_PERIOD_PLUSEXP = 923, //SI_PERIOD_PLUSJOBEXP = 924, @@ -1800,14 +1800,78 @@ enum si_type { //SI_HELM_ISIA = 930, //SI_HELM_ASIR = 931, //SI_HELM_URJ = 932, - SI_SUHIDE = 933, + SI_SUHIDE = 933, //SI_ = 934, //SI_DORAM_BUF_01 = 935, //SI_DORAM_BUF_02 = 936, - SI_SPRITEMABLE = 937, + SI_SPRITEMABLE = 937, + //SI_AID_PERIOD_RECEIVEITEM = 938, + //SI_AID_PERIOD_PLUSEXP = 939, + //SI_AID_PERIOD_PLUSJOBEXP = 940, + //SI_AID_PERIOD_DEADPENALTY = 941, + //SI_AID_PERIOD_ADDSTOREITEMCOUNT = 942, + //SI_ = 943, + //SI_ = 944, + //SI_ = 945, + //SI_ = 946, + //SI_ = 947, + //SI_ = 948, + //SI_ = 949, + //SI_HISS = 950, + //SI_ = 951, + //SI_NYANGGRASS = 952, + //SI_CHATTERING = 953, + //SI_ = 954, + //SI_ = 955, + //SI_ = 956, + //SI_ = 957, + //SI_ = 958, + //SI_ = 959, + //SI_ = 960, + //SI_GROOMING = 961, + //SI_PROTECTIONOFSHRIMP = 962, //SI_EP16_2_BUFF_SS = 963, //SI_EP16_2_BUFF_SC = 964, //SI_EP16_2_BUFF_AC = 965, + //SI_GS_MAGICAL_BULLET = 966, + //SI_ = 967, + //SI_ = 968, + //SI_ = 969, + //SI_ = 970, + //SI_ = 971, + //SI_ = 972, + //SI_ = 973, + //SI_ = 974, + //SI_ = 975, + //SI_FALLEN_ANGEL = 976, + //SI_ = 977, + //SI_ = 978, + //SI_BLAZE_BEAD = 979, + //SI_FROZEN_BEAD = 980, + //SI_BREEZE_BEAD = 981, + //SI_ = 982, + //SI_AID_PERIOD_RECEIVEITEM_2ND = 983, + //SI_AID_PERIOD_PLUSEXP_2ND = 984, + //SI_AID_PERIOD_PLUSJOBEXP_2ND = 985, + //SI_PRONTERA_JP = 986, + //SI_ = 987, + //SI_GLOOM_CARD = 988, + //SI_PHARAOH_CARD = 989, + //SI_KIEL_CARD = 990, + //SI_ = 991, + //SI_CHEERUP = 992, + //SI_ = 993, + //SI_ = 994, + //SI_S_MANAPOTION = 995, + //SI_M_DEFSCROLL = 996, + //SI_ = 997, + //SI_ = 998, + //SI_ = 999, + //SI_AS_RAGGED_GOLEM_CARD = 1000, + //SI_LHZ_DUN_N1 = 1001, + //SI_LHZ_DUN_N2 = 1002, + //SI_LHZ_DUN_N3 = 1003, + //SI_LHZ_DUN_N4 = 1004, #ifndef SI_MAX SI_MAX, #endif diff --git a/src/map/unit.c b/src/map/unit.c index 7d68bef66..79abb8c6a 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1667,6 +1667,9 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui } else skill->castend_id(ud->skilltimer,tick,src->id,0); + if (sd != NULL && battle_config.prevent_logout_trigger & PLT_SKILL) + sd->canlog_tick = timer->gettick(); + return 1; } @@ -1813,6 +1816,10 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui ud->skilltimer = INVALID_TIMER; skill->castend_pos(ud->skilltimer,tick,src->id,0); } + + if (sd != NULL && battle_config.prevent_logout_trigger & PLT_SKILL) + sd->canlog_tick = timer->gettick(); + return 1; } @@ -2253,6 +2260,9 @@ int unit_attack_timer_sub(struct block_list* src, int tid, int64 tick) ud->attacktimer = timer->add(ud->attackabletime,unit->attack_timer,src->id,0); } + if (sd != NULL && battle_config.prevent_logout_trigger & PLT_ATTACK) + sd->canlog_tick = timer->gettick(); + return 1; } |