- Added 22nd argument to 'getmonsterinfo' which returns the mvp_exp of a monster.

- Changed 'checkvending' to return 2 if player is using @autotrade.
- Follow up to r15871: used spaces so everything lines up (people might use different Tab Size in their text editors).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15872 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
brianluau 2012-04-19 05:56:01 +00:00
parent 6aac4722fb
commit 64379ae3d4
4 changed files with 235 additions and 216 deletions

View File

@ -1315,6 +1315,7 @@ MOB_SIZE 18
MOB_RACE 19 MOB_RACE 19
MOB_ELEMENT 20 MOB_ELEMENT 20
MOB_MODE 21 MOB_MODE 21
MOB_MVPEXP 22
AI_ACTION_TYPE 0 AI_ACTION_TYPE 0
AI_ACTION_TAR_TYPE 1 AI_ACTION_TAR_TYPE 1

View File

@ -3050,17 +3050,29 @@ It will return -1 if there is no such monster (or the type value is invalid),
or "null" if you requested the monster's name. or "null" if you requested the monster's name.
Valid types are listed in const.txt: Valid types are listed in const.txt:
MOB_NAME 0 MOB_LV 1 MOB_NAME 0
MOB_MAXHP 2 MOB_BASEEXP 3 MOB_LV 1
MOB_JOBEXP 4 MOB_ATK1 5 MOB_MAXHP 2
MOB_ATK2 6 MOB_DEF 7 MOB_BASEEXP 3
MOB_MDEF 8 MOB_STR 9 MOB_JOBEXP 4
MOB_AGI 10 MOB_VIT 11 MOB_ATK1 5
MOB_INT 12 JOB_DEX 13 MOB_ATK2 6
MOB_LUK 14 MOB_RANGE 15 MOB_DEF 7
MOB_RANGE2 16 MOB_RANGE3 17 MOB_MDEF 8
MOB_SIZE 18 MOB_RACE 19 MOB_STR 9
MOB_ELEMENT 20 MOB_MODE 21 MOB_AGI 10
MOB_VIT 11
MOB_INT 12
MOB_DEX 13
MOB_LUK 14
MOB_RANGE 15
MOB_RANGE2 16
MOB_RANGE3 17
MOB_SIZE 18
MOB_RACE 19
MOB_ELEMENT 20
MOB_MODE 21
MOB_MVPEXP 22
Check sample in doc/sample/getmonsterinfo.txt Check sample in doc/sample/getmonsterinfo.txt
@ -3334,13 +3346,18 @@ bird and 0 if they don't.
--------------------------------------- ---------------------------------------
*checkvending ({"<player name>"}) *checkvending({"<player name>"})
*checkchatting ({"<Player Name>"}) *checkchatting({"<Player Name>"})
If the player's name is given, this command checks for that player Checks if the player is vending or in a chatroom.
to be online and whether he/she is chatting or vending. Name is optional, and defaults to the attached player if omitted.
When no name is given, the attached player is used for checking.
Returns true or false (1 or 0) when the player is chatting/vending or not. Return values for 'checkvending' are
0 = not vending
1 = normal vending
2 = vending using @autotrade
'checkchatting' returns 1 if they are in a chat room, 0 if they are not.
Example(s): Example(s):
if (checkVending("Aaron")) mes "Aaron is currently vending!"; if (checkVending("Aaron")) mes "Aaron is currently vending!";

View File

@ -6014,7 +6014,7 @@ int pc_skillheal_bonus(struct map_session_data *sd, int skill_num)
case PR_SANCTUARY: if( !(battle_config.skill_add_heal_rate&2) ) 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 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 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; case BA_APPLEIDUN: if( !(battle_config.skill_add_heal_rate&16)) bonus = 0; break;
} }
} }

View File

@ -13922,6 +13922,7 @@ BUILDIN_FUNC(getmonsterinfo)
case 19: script_pushint(st,mob->status.race); break; case 19: script_pushint(st,mob->status.race); break;
case 20: script_pushint(st,mob->status.def_ele); break; case 20: script_pushint(st,mob->status.def_ele); break;
case 21: script_pushint(st,mob->status.mode); break; case 21: script_pushint(st,mob->status.mode); break;
case 22: script_pushint(st,mob->mexp); break;
default: script_pushint(st,-1); //wrong Index default: script_pushint(st,-1); //wrong Index
} }
return 0; return 0;
@ -13937,7 +13938,7 @@ BUILDIN_FUNC(checkvending) // check vending [Nab4]
sd = script_rid2sd(st); sd = script_rid2sd(st);
if(sd) if(sd)
script_pushint(st,sd->state.vending); script_pushint(st, sd->state.autotrade ? 2 : sd->state.vending);
else else
script_pushint(st,0); script_pushint(st,0);