From a25c820fba6bd86fe2fb50e2b5b512295583522d Mon Sep 17 00:00:00 2001 From: brianluau Date: Mon, 5 Nov 2012 18:25:15 +0000 Subject: - Added LOOK_*** script constants, same names as from map.h - Changed atcommand "@changelook" to changelook script command in custom quest_shop.txt git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16862 54d463be-8e91-2dee-dedb-b68131a5f0ec --- db/const.txt | 14 ++++++++++++++ npc/custom/etc/monster_arena.txt | 6 +----- npc/custom/etc/shifty_assassin.txt | 2 +- npc/custom/quests/quest_shop.txt | 18 +++++++++--------- src/map/npc.c | 4 ++-- 5 files changed, 27 insertions(+), 17 deletions(-) diff --git a/db/const.txt b/db/const.txt index 3171504cd..4b819d49c 100644 --- a/db/const.txt +++ b/db/const.txt @@ -599,6 +599,20 @@ EQI_ACC_R 8 EQI_HEAD_MID 9 EQI_HEAD_LOW 10 +LOOK_BASE 0 +LOOK_HAIR 1 +LOOK_WEAPON 2 +LOOK_HEAD_BOTTOM 3 +LOOK_HEAD_TOP 4 +LOOK_HEAD_MID 5 +LOOK_HAIR_COLOR 6 +LOOK_CLOTHES_COLOR 7 +LOOK_SHIELD 8 +LOOK_SHOES 9 +LOOK_BODY 10 +LOOK_FLOOR 11 +LOOK_ROBE 12 + Eff_Stone 0 Eff_Freeze 1 Eff_Stun 2 diff --git a/npc/custom/etc/monster_arena.txt b/npc/custom/etc/monster_arena.txt index 251759a7c..0b6b1cc96 100644 --- a/npc/custom/etc/monster_arena.txt +++ b/npc/custom/etc/monster_arena.txt @@ -766,11 +766,7 @@ gon_test,72,87,5 duplicate(SummonPad) Summon Pad 3 111,2,2 // Skill Disabler // -gon_test,57,99,5 script Skill Disable 111,3,3,{ - atcommand strcharinfo(0) + "@skilloff"; - disablenpc "Skill Disable"; - end; -} +gon_test mapflag noskill // Duel Arena // gon_test,58,103,5 script Duel Master#01 92,{ diff --git a/npc/custom/etc/shifty_assassin.txt b/npc/custom/etc/shifty_assassin.txt index 8f4bbe4cf..46d3aab07 100644 --- a/npc/custom/etc/shifty_assassin.txt +++ b/npc/custom/etc/shifty_assassin.txt @@ -100,7 +100,7 @@ M_Kill: mes "Your attack succeeded but only ^FF0000" + #ninjasr + "^000000 Ninjas survived."; atcommand strcharinfo(0) + "@kill "+@name$; - announce @name$+" has been assassinated by " + strcharinfo(0) +"'s Ninjas.",8; + announce @name$+" has been assassinated by " + strcharinfo(0) +"'s Ninjas.",bc_npc; close; // FAILED ATTACK // diff --git a/npc/custom/quests/quest_shop.txt b/npc/custom/quests/quest_shop.txt index 3565d5574..bfb5a20b7 100644 --- a/npc/custom/quests/quest_shop.txt +++ b/npc/custom/quests/quest_shop.txt @@ -102,13 +102,13 @@ OnBuyItem: specialeffect2 699; close; case 2: - set @qe3, getlook(3); - set @qe4, getlook(4); - set @qe5, getlook(5); + set @qe3, getlook(LOOK_HEAD_BOTTOM); + set @qe4, getlook(LOOK_HEAD_TOP); + set @qe5, getlook(LOOK_HEAD_MID); set @qe6,1; - if (@qe1&1) atcommand "@changelook 3 "+@qe2; - if (@qe1&256) atcommand "@changelook 1 "+@qe2; - if (@qe1&512) atcommand "@changelook 2 "+@qe2; + if (@qe1&1) changelook LOOK_HEAD_BOTTOM, @qe2; + if (@qe1&256) changelook LOOK_HEAD_TOP, @qe2; + if (@qe1&512) changelook LOOK_HEAD_MID, @qe2; break; case 3: close; @@ -116,9 +116,9 @@ OnBuyItem: } OnEnd: if (@qe6) { - atcommand "@changelook 3 "+@qe3; - atcommand "@changelook 1 "+@qe4; - atcommand "@changelook 2 "+@qe5; + changelook LOOK_HEAD_BOTTOM, @qe3; + changelook LOOK_HEAD_TOP, @qe4; + changelook LOOK_HEAD_MID, @qe5; } for(set .@i,0; .@i<7; set .@i,.@i+1) setd "@qe"+.@i,0; diff --git a/src/map/npc.c b/src/map/npc.c index cb40c85c5..41069c015 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1577,7 +1577,7 @@ static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* script_cleararray_pc(sd, "@sold_attribute", (void*)0); script_cleararray_pc(sd, "@sold_identify", (void*)0); - for( j = 0; MAX_SLOTS > j; j++ ) + for( j = 0; j < MAX_SLOTS; j++ ) {// clear each of the card slot entries key_card[j] = 0; snprintf(card_slot, sizeof(card_slot), "@sold_card%d", j + 1); @@ -1598,7 +1598,7 @@ static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* script_setarray_pc(sd, "@sold_attribute", i, (void*)(intptr_t)sd->status.inventory[idx].attribute, &key_attribute); script_setarray_pc(sd, "@sold_identify", i, (void*)(intptr_t)sd->status.inventory[idx].identify, &key_identify); - for( j = 0; MAX_SLOTS > j; j++ ) + for( j = 0; j < MAX_SLOTS; j++ ) {// store each of the cards from the equipment in the array snprintf(card_slot, sizeof(card_slot), "@sold_card%d", j + 1); script_setarray_pc(sd, card_slot, i, (void*)(intptr_t)sd->status.inventory[idx].card[j], &key_card[j]); -- cgit v1.2.3-60-g2f50