Super Novices are now auto-revived correctly - Fixes bugreport:7683
Skulls are able to be dropped - Fixes bugreport:7588 Added simple identifyall atcommand - Suggestion topic tid:76702 -> Added documentation Some sc_start script command cleanup Removed useless script command getequipisidentify git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17341 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
112030451a
commit
88f9e9318c
@ -50,7 +50,7 @@
|
||||
7418,475,100 // Written Request(B)
|
||||
|
||||
// PVP Item
|
||||
7420,499,100 // Skull
|
||||
7420,498,100 // Skull
|
||||
|
||||
// 10.3 Quest items
|
||||
// * "Gaebolg family Curse" items
|
||||
|
@ -50,7 +50,7 @@
|
||||
7418,475,100 // Written Request(B)
|
||||
|
||||
// PVP Item
|
||||
7420,499,100 // Skull
|
||||
7420,498,100 // Skull
|
||||
|
||||
// 10.3 Quest items
|
||||
// * "Gaebolg family Curse" items
|
||||
|
@ -583,6 +583,12 @@ Opens the Identification window if any unappraised items are in your inventory.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
@identifyall
|
||||
|
||||
Automatically identifies all unidentified items in your inventory.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
@trade <player name>
|
||||
|
||||
Opens the trade window with the specified player.
|
||||
|
@ -54,12 +54,6 @@ payon,157,146,6 script Suhnbi#cash 85,{
|
||||
mes "I don't think I can refine this item at all.";
|
||||
close;
|
||||
}
|
||||
if( !getequipisidentify(.@part) )
|
||||
{
|
||||
mes "[Suhnbi]";
|
||||
mes "This has not been identified. So, it can't be refined...";
|
||||
close;
|
||||
}
|
||||
if( getequiprefinerycnt(.@part) >= 10 )
|
||||
{
|
||||
mes "[Suhnbi]";
|
||||
|
@ -635,16 +635,6 @@ function script refinemain {
|
||||
mes "refine this item at all...";
|
||||
close;
|
||||
}
|
||||
//Check if the item is identified... (Don't know why this is in here... but kept it anyway)
|
||||
if(!getequipisidentify(.@part)) {
|
||||
mes "[" + getarg(0) + "]";
|
||||
mes "You can't refine this";
|
||||
mes "if you haven't appraised";
|
||||
mes "it first. Make sure your";
|
||||
mes "stuff is identified before";
|
||||
mes "I can refine it.";
|
||||
close;
|
||||
}
|
||||
//Check to see if the items is already +10
|
||||
if(getequiprefinerycnt(.@part) >= 10) {
|
||||
mes "[" + getarg(0) + "]";
|
||||
@ -1266,4 +1256,4 @@ function script repairmain {
|
||||
mes "items to repair.";
|
||||
close;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1963,11 +1963,6 @@ mjolnir_01,35,136,7 script Dwarf Blacksmith#west 826,{
|
||||
mes "me to do with this?";
|
||||
close;
|
||||
}
|
||||
if (getequipisidentify(.@part) == 0) {
|
||||
mes "[Vestri]";
|
||||
mes "You'd better identify this item first. If we don't know what it is, what's the point of upgrading it?";
|
||||
close;
|
||||
}
|
||||
if (getequiprefinerycnt(.@part) >= 10) {
|
||||
mes "[Vestri]";
|
||||
mes "Oh, this is excellent! This piece here has been perfectly refined! But this isn't what I want. I can't do any work on this at all.";
|
||||
@ -2189,11 +2184,6 @@ mjolnir_01,35,136,7 script Dwarf Blacksmith#west 826,{
|
||||
mes "me to do with this?";
|
||||
close;
|
||||
}
|
||||
if (getequipisidentify(.@part) == 0) {
|
||||
mes "[Vestri]";
|
||||
mes "You'd better identify this item first. If we don't know what it is, what's the point of upgrading it?";
|
||||
close;
|
||||
}
|
||||
if (getequiprefinerycnt(.@part) >= 10) {
|
||||
mes "[Vestri]";
|
||||
mes "Oh, this is excellent! This piece here has been perfectly refined! But this isn't what I want. I can't do any work on this at all.";
|
||||
|
@ -70,11 +70,6 @@ malangdo,221,174,6 script Holink#mal_cash 559,{
|
||||
mes "Even Aragam can't refine such a thing, meow.";
|
||||
close;
|
||||
}
|
||||
if (!getequipisidentify(.@part)) {
|
||||
mes "[Holink]";
|
||||
mes "Meow? How did you wear something that wasn't appraised, meow?~";
|
||||
close;
|
||||
}
|
||||
if (getequiprefinerycnt(.@part) >= 10) {
|
||||
mes "[Holink]";
|
||||
mes "Meow~ Perfect refining. Did Aragam do this, meow?~";
|
||||
|
@ -72,11 +72,6 @@
|
||||
mes "This item cannot be refined.";
|
||||
close;
|
||||
}
|
||||
if (!getequipisidentify(.@part)) {
|
||||
mes "[Blacksmith Dister]";
|
||||
mes "This item can't be refined because it has not been identified.";
|
||||
close;
|
||||
}
|
||||
set .@equip_refine, getequiprefinerycnt(.@part);
|
||||
if (.@equip_refine < 6 || .@equip_refine > 12) {
|
||||
mes "[Blacksmith Dister]";
|
||||
|
@ -74,11 +74,6 @@
|
||||
mes "This item can't be refined.";
|
||||
close;
|
||||
}
|
||||
if (!getequipisidentify(.@part)) {
|
||||
mes "[Blacksmith Mighty Hammer]";
|
||||
mes "This item can't be refined because it has not been identified.";
|
||||
close;
|
||||
}
|
||||
if (getequiprefinerycnt(.@part) < 7 || getequiprefinerycnt(.@part) > 9) {
|
||||
mes "[Blacksmith Mighty Hammer]";
|
||||
mes "I only handle items with refine levels from +7 to +9.";
|
||||
@ -213,11 +208,6 @@ lhz_in02,280,19,3 duplicate(MightyHammer) Mighty Hammer#lhz 826
|
||||
mes "Even I cannot refine this item. There's no way.";
|
||||
close;
|
||||
}
|
||||
if (!getequipisidentify(.@part)) {
|
||||
mes "[Basta]";
|
||||
mes "I can't do anything about unidentified items.";
|
||||
close;
|
||||
}
|
||||
if (getequiprefinerycnt(.@part) < 10) {
|
||||
mes "[Basta]";
|
||||
mes "Haven't I told you? I only refine equipments that are +10 and above.";
|
||||
|
@ -77,16 +77,6 @@ function script refinenew {
|
||||
mes "refine this item at all...";
|
||||
close;
|
||||
}
|
||||
//Check if the item is identified... (Don't know why this is in here... but kept it anyway)
|
||||
if(!getequipisidentify(.@part)) {
|
||||
mes "[" + getarg(0) + "]";
|
||||
mes "You can't refine this";
|
||||
mes "if you haven't appraised";
|
||||
mes "it first. Make sure your";
|
||||
mes "stuff is identified before";
|
||||
mes "I can refine it.";
|
||||
close;
|
||||
}
|
||||
//Check to see if the items is at least +10
|
||||
if(getequiprefinerycnt(.@part) < 10) {
|
||||
mes "["+ getarg(0) +"]";
|
||||
@ -553,11 +543,6 @@ malangdo,224,172,6 script Clink#mal_normal 544,{
|
||||
mes "This can't be refined!!";
|
||||
close;
|
||||
}
|
||||
if (!getequipisidentify(.@part)) {
|
||||
mes "[Clink]";
|
||||
mes "How did you wear something that wasn't appraised?";
|
||||
close;
|
||||
}
|
||||
if (getequiprefinerycnt(.@part) >= 10) {
|
||||
mes "[Clink]";
|
||||
mes "Perfect refining. Did I do this for you?";
|
||||
|
@ -73,12 +73,6 @@ prontera,184,177,6 script Refine Master 851,{
|
||||
mes "This item is impossible to refine.";
|
||||
close;
|
||||
}
|
||||
if (!getequipisidentify(.@part)) {
|
||||
mes "[Refine Master]";
|
||||
mes "Oh, I'm sorry.";
|
||||
mes "You have to identify this item first.";
|
||||
close;
|
||||
}
|
||||
switch(getequipweaponlv(.@part)) {
|
||||
default:
|
||||
case 0:
|
||||
|
@ -6580,6 +6580,23 @@ ACMD_FUNC(identify)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*===============================================
|
||||
* @identifyall
|
||||
* => Indentify all items in inventory - Akinari
|
||||
*-----------------------------------------------*/
|
||||
ACMD_FUNC(identifyall)
|
||||
{
|
||||
int i;
|
||||
nullpo_retr(-1, sd);
|
||||
for(i=0; i<MAX_INVENTORY; i++) {
|
||||
if (sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].identify!=1) {
|
||||
sd->status.inventory[i].identify=1;
|
||||
clif_item_identified(sd,i,0);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*==========================================
|
||||
* @gmotd (Global MOTD)
|
||||
* by davidsiaw :P
|
||||
@ -9131,6 +9148,7 @@ void atcommand_basecommands(void) {
|
||||
ACMD_DEF(refresh),
|
||||
ACMD_DEF(refreshall),
|
||||
ACMD_DEF(identify),
|
||||
ACMD_DEF(identifyall),
|
||||
ACMD_DEF(gmotd),
|
||||
ACMD_DEF(misceffect),
|
||||
ACMD_DEF(mobsearch),
|
||||
|
@ -6784,6 +6784,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
||||
if( get_percentage(sd->status.base_exp,next) >= 99 ) {
|
||||
sd->state.snovice_dead_flag = 1;
|
||||
pc_setstand(sd);
|
||||
pc_setrestartvalue(sd,1);
|
||||
status_percent_heal(&sd->bl, 100, 100);
|
||||
clif_resurrection(&sd->bl, 1);
|
||||
if(battle_config.pc_invincible_time)
|
||||
|
@ -7529,32 +7529,6 @@ BUILDIN_FUNC(getequipisenableref)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*==========================================
|
||||
* Chk if the item equiped at pos is identify (huh ?)
|
||||
* return (npc)
|
||||
* 1 : true
|
||||
* 0 : false
|
||||
*------------------------------------------*/
|
||||
BUILDIN_FUNC(getequipisidentify)
|
||||
{
|
||||
int i = -1,num;
|
||||
TBL_PC *sd;
|
||||
|
||||
num = script_getnum(st,2);
|
||||
sd = script_rid2sd(st);
|
||||
if( sd == NULL )
|
||||
return 0;
|
||||
|
||||
if (num > 0 && num <= ARRAYLENGTH(equip))
|
||||
i=pc_checkequip(sd,equip[num-1]);
|
||||
if(i >= 0)
|
||||
script_pushint(st,sd->status.inventory[i].identify);
|
||||
else
|
||||
script_pushint(st,0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*==========================================
|
||||
* Get the item refined value at pos
|
||||
* return (npc)
|
||||
@ -9839,7 +9813,7 @@ BUILDIN_FUNC(sc_start)
|
||||
TBL_NPC * nd = map_id2nd(st->oid);
|
||||
struct block_list* bl;
|
||||
enum sc_type type;
|
||||
int tick, val1, val2, val3, val4=0, rate, flag, isitem;
|
||||
int tick, val1, val2, val3, val4=0, rate, flag;
|
||||
char start_type;
|
||||
const char* command = script_getfuncname(st);
|
||||
|
||||
@ -9854,8 +9828,13 @@ BUILDIN_FUNC(sc_start)
|
||||
tick = script_getnum(st,3);
|
||||
val1 = script_getnum(st,4);
|
||||
|
||||
//If from NPC we make default flag 1 to be unavoidable
|
||||
if(nd && nd->bl.id == fake_nd->bl.id)
|
||||
flag = script_hasdata(st,5+start_type)?script_getnum(st,5+start_type):1;
|
||||
else
|
||||
flag = script_hasdata(st,5+start_type)?script_getnum(st,5+start_type):2;
|
||||
|
||||
rate = script_hasdata(st,4+start_type)?min(script_getnum(st,4+start_type),10000):10000;
|
||||
flag = script_hasdata(st,5+start_type)?script_getnum(st,5+start_type):2;
|
||||
|
||||
if(script_hasdata(st,(6+start_type)))
|
||||
bl = map_id2bl(script_getnum(st,(6+start_type)));
|
||||
@ -9873,25 +9852,22 @@ BUILDIN_FUNC(sc_start)
|
||||
val4 = 1;// Mark that this was a thrown sc_effect
|
||||
}
|
||||
|
||||
//solving if script from npc or item
|
||||
isitem = (nd && nd->bl.id == fake_nd->bl.id || flag != 2)?true:false;
|
||||
if(!bl)
|
||||
return 0;
|
||||
|
||||
switch(start_type) {
|
||||
case 1:
|
||||
if(bl)
|
||||
status_change_start(isitem?bl:NULL, bl, type, rate, val1, 0, 0, val4, tick, flag);
|
||||
status_change_start(bl, bl, type, rate, val1, 0, 0, val4, tick, flag);
|
||||
break;
|
||||
case 2:
|
||||
val2 = script_getnum(st,5);
|
||||
if(bl)
|
||||
status_change_start(isitem?bl:NULL, bl, type, rate, val1, val2, 0, val4, tick, flag);
|
||||
status_change_start(bl, bl, type, rate, val1, val2, 0, val4, tick, flag);
|
||||
break;
|
||||
case 4:
|
||||
val2 = script_getnum(st,5);
|
||||
val3 = script_getnum(st,6);
|
||||
val4 = script_getnum(st,7);
|
||||
if(bl)
|
||||
status_change_start(isitem?bl:NULL, bl, type, rate, val1, val2, val3, val4, tick, flag);
|
||||
status_change_start(bl, bl, type, rate, val1, val2, val3, val4, tick, flag);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -17758,7 +17734,6 @@ struct script_function buildin_func[] = {
|
||||
BUILDIN_DEF(repairall,""),
|
||||
BUILDIN_DEF(getequipisequiped,"i"),
|
||||
BUILDIN_DEF(getequipisenableref,"i"),
|
||||
BUILDIN_DEF(getequipisidentify,"i"),
|
||||
BUILDIN_DEF(getequiprefinerycnt,"i"),
|
||||
BUILDIN_DEF(getequipweaponlv,"i"),
|
||||
BUILDIN_DEF(getequippercentrefinery,"i"),
|
||||
|
@ -6259,7 +6259,7 @@ int status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_typ
|
||||
struct map_session_data *sd;
|
||||
|
||||
nullpo_ret(bl);
|
||||
if(src==NULL) return tick?tick:1;//If no source, it can't be resisted (NPC given)
|
||||
if(src==NULL) return tick?tick:1; //This should not happen in current implementation, but leave it anyway
|
||||
|
||||
//Status that are blocked by Golden Thief Bug card or Wand of Hermod
|
||||
if (status_isimmune(bl))
|
||||
@ -6565,8 +6565,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
||||
sc = status_get_sc(bl);
|
||||
status = status_get_status_data(bl);
|
||||
|
||||
if( type <= SC_NONE || type >= SC_MAX )
|
||||
{
|
||||
if( type <= SC_NONE || type >= SC_MAX ) {
|
||||
ShowError("status_change_start: invalid status change (%d)!\n", type);
|
||||
return 0;
|
||||
}
|
||||
@ -6577,8 +6576,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
||||
if( status_isdead(bl) && type != SC_NOCHAT ) // SC_NOCHAT should work even on dead characters
|
||||
return 0;
|
||||
|
||||
if( bl->type == BL_MOB)
|
||||
{
|
||||
if( bl->type == BL_MOB) {
|
||||
struct mob_data *md = BL_CAST(BL_MOB,bl);
|
||||
if(md && (md->class_ == MOBID_EMPERIUM || mob_is_battleground(md)) && type != SC_SAFETYWALL && type != SC_PNEUMA)
|
||||
return 0; //Emperium/BG Monsters can't be afflicted by status changes
|
||||
@ -6642,8 +6640,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
||||
sd = BL_CAST(BL_PC, bl);
|
||||
|
||||
//Adjust tick according to status resistances
|
||||
if( !(flag&(1|4)) )
|
||||
{
|
||||
if( !(flag&(1|4)) ) {
|
||||
tick = status_get_sc_def(src, bl, type, rate, tick, flag);
|
||||
if( !tick ) return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user