* Switched some 'close' commands to 'end' in custom scripts. (follow-up r17280)

* Deleted some code in Global_Functions that really shouldn't have been there. (blame: r15262)
* Other documentation changes and cleaning...

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17282 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
euphyy 2013-04-22 05:00:27 +00:00
parent 320388717e
commit 3f514b442d
11 changed files with 55 additions and 69 deletions

View File

@ -114,7 +114,7 @@ show_hp_sp_gain: yes
// If set, when A accepts B as a friend, B will also be added to A's friend
// list, otherwise, only A appears in B's friend list.
// NOTE: this setting enables friend auto-adding and auto-deletion
// NOTE: this setting enables friend auto-adding and auto-deletion.
friend_auto_add: yes
// Are simultaneous trade/party/guild invite requests automatically rejected?

View File

@ -96,12 +96,15 @@ autosave_time: 60
// Display information on the console whenever characters/guilds/parties/pets are loaded/saved?
save_log: yes
// Start point, Map name followed by coordinates (x,y)
// Starting point for new characters
// Format: <map_name>,<x>,<y>
start_point: new_1-1,53,111
// Starting items for new characters (max MAX_STARTITEM)
// Format is: id1,qt1,pos1:idn,qtn,posn:...
start_items: 1201,1,2:2301,1,16
// Starting items for new characters
// Max number of items is MAX_STARTITEM in char.c (default 32)
// Format: <id>,<amount>,<position>:<id>,<amount>,<position>:...
// To auto-equip an item, include the position where it will be equipped; otherwise, use zero.
start_items: 1201,1,2:2301,1,16
// Starting zeny for new characters
start_zeny: 0

View File

@ -1375,10 +1375,10 @@
1370: Usage: ex. "@set PoringCharVarSTR$" outputs its value, Super Duper String.
1371: NPC variables may not be used with @set.
1372: Instance variables may not be used with @set.
1373: %s value is now :%d
1374: %s value is now :%s
1375: %s is empty
1376: %s data type is not supported :%u
1373: %s value is now: %d
1374: %s value is now: %s
1375: %s is blank.
1376: %s data type is not supported: %u
// @reloadquestdb
1377: Quest database has been reloaded.

View File

@ -3,7 +3,7 @@
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.0
//= 1.0a
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
@ -13,38 +13,27 @@
prontera,124,201,1 script Universal Rental NPC 726,{
if (ismounting()) {
message strcharinfo(0),"You must first remove your mount.";
close; }
else if ((eaclass()&EAJ_THIRDMASK==EAJ_RANGER) && !countitem(6124)) {
end;
} else if ((eaclass()&EAJ_THIRDMASK==EAJ_RANGER) && !countitem(6124)) {
if (!checkfalcon() && getskilllv("HT_FALCON") && !checkoption(Option_Wug) && !checkoption(Option_Wugrider)) {
if(select(" ~ Falcon: ~ Warg")==1) setfalcon;
else getitem 6124,1; }
else getitem 6124,1; }
else if ((eaclass()&EAJ_THIRDMASK==EAJ_MECHANIC) && !checkcart() && getskilllv("MC_PUSHCART")) {
else getitem 6124,1;
} else getitem 6124,1;
} else if ((eaclass()&EAJ_THIRDMASK==EAJ_MECHANIC) && !checkcart() && getskilllv("MC_PUSHCART")) {
if (!checkmadogear() && getskilllv("NC_MADOLICENCE")) {
if(select(" ~ Cart: ~ Mado")==1) setcart;
else setmadogear; }
else setcart; }
else if (!checkcart() && getskilllv("MC_PUSHCART")) setcart;
else setmadogear;
} else setcart;
} else if (!checkcart() && getskilllv("MC_PUSHCART")) setcart;
else if (!checkfalcon() && getskilllv("HT_FALCON") && !checkoption(Option_Wug) && !checkoption(Option_Wugrider)) setfalcon;
else if (!checkriding() && getskilllv("KN_RIDING")) {
if (eaclass()&EAJ_THIRDMASK==EAJ_RUNE_KNIGHT) setdragon;
else setriding; }
else if (!checkmadogear() && getskilllv("NC_MADOLICENCE")) setmadogear;
else setriding;
} else if (!checkmadogear() && getskilllv("NC_MADOLICENCE")) setmadogear;
else {
message strcharinfo(0),"You do not meet requirements to rent.";
close; }
end;
}
specialeffect2 EF_TEIHIT3;
close;
end;
}
//============================================================
// Old changelog
//============================================================
//= A Free PecoPeco and Falcon Breeder
//= 1.1 FIXED checkriding/cart/falcon funcs [Lupus]
//= 1.2 Added Rebirth/Advanced Class support [Mass Zero]
//= 1.3 Simplified the checks of job [Silentdragon]
//= 1.3a Fixed a Typo Error. [Samuray22]
//= Thanks to ~AnnieRuru~.
//= 1.4 Optimized Script. No need for 50 million Labels. [Spre]
//============================================================

View File

@ -3,7 +3,7 @@
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.0
//= 1.0a
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
@ -16,12 +16,11 @@
set .@Buffs,0; // Also buff players? (1: yes / 0: no)
set .@Delay,0; // Heal delay, in seconds
callfunc "F_ClearGarbage",0;
if (@HD > gettimetick(2)) end;
if (.@Price) {
message strcharinfo(0),"Healing costs "+.@Price+" Zeny.";
if (Zeny < .@Price) end;
if(select("^0055FFHeal^000000:^777777Cancel^000000") == 2) close;
if(select("^0055FFHeal^000000:^777777Cancel^000000") == 2) end;
set Zeny, Zeny-.@Price;
}
specialeffect2 EF_HEAL2; percentheal 100,100;
@ -30,7 +29,7 @@
specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10;
}
if (.@Delay) set @HD, gettimetick(2)+.@Delay;
close;
end;
}
alberta,25,240,6 duplicate(Healer) Healer#alb 909
@ -50,7 +49,7 @@ hugel,89,150,6 duplicate(Healer) Healer#hug 909
izlude,125,118,5 duplicate(Healer) Healer#izl 909
lighthalzen,149,103,6 duplicate(Healer) Healer#li 909
louyang,225,103,4 duplicate(Healer) Healer#lou 909
malangdo,226,188,4 duplicate(Healer) Healer#mal 909
malangdo,132,114,6 duplicate(Healer) Healer#mal 909
malaya,205,205,6 duplicate(Healer) Healer#malay 909
manuk,256,176,6 duplicate(Healer) Healer#man 909
mid_camp,203,289,6 duplicate(Healer) Healer#mid 909

View File

@ -3,7 +3,7 @@
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.2
//= 1.2a
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
@ -22,9 +22,11 @@ menu "Last Warp ^777777["+lastwarp$+"]^000000",-,
" ~ Towns",Towns, " ~ Fields",Fields, " ~ Dungeons",Dungeons,
" ~ Guild Castles",Castles, " ~ Special Areas",Special;
if (lastwarp$ == "") dispbottom "You have not warped anywhere yet.";
else warp lastwarp$,lastwarpx,lastwarpy;
close;
if (lastwarp$ == "")
dispbottom "You have not warped anywhere yet.";
else
warp lastwarp$,lastwarpx,lastwarpy;
end;
// ------------------- Functions -------------------
// * Go("<map>",<x>,<y>);
@ -45,7 +47,7 @@ menu "Last Warp ^777777["+lastwarp$+"]^000000",-,
function Go {
warp getarg(0),getarg(1,0),getarg(2,0);
getmapxy(lastwarp$,lastwarpx,lastwarpy,0);
close;
end;
}
function Disp {
set @menu$,"";
@ -66,7 +68,7 @@ function Pick {
warp getarg(0)+((.@i<10)?"0":"")+.@i,@c[.@i*2],@c[.@i*2+1];
}
getmapxy(lastwarp$,lastwarpx,lastwarpy,0);
close;
end;
}
// --------------------------------------------------
@ -240,7 +242,7 @@ D15: setarray @c[2],40,103,203,34,266,168,130,272;
Disp("Gefenia",1,4); Pick("gefenia",0);
D16: setarray @c[0],104,99,115,236,106,132,203,200;
Disp("Geffen Dungeon",1,4); Pick("gef_dun",1);
D17: setarray @c[2],375,304,199,29,104,25,150,15,157,287,147,15,258,255,108,291,171,283,68,277,156,7,12,7,133,271,224,274,14,70,150,14;
D17: setarray @c[2],370,304,199,29,104,25,150,15,157,287,147,15,258,255,108,291,171,283,68,277,156,7,12,7,133,271,224,274,14,70,150,14;
Disp("","Entrance:Castle 1:Castle 2:Chivalry 1:Chivalry 2:Churchyard:Culvert 1:Culvert 2:Culvert 3:Culvert 4:St. Abbey:Staircase Dungeon:Underground Cave 1:Underground Cave 2:Underground Prison 1:Underground Prison 2");
Pick("","glast_01","gl_cas01","gl_cas02","gl_knt01","gl_knt02","gl_chyard","gl_sew01","gl_sew02","gl_sew03","gl_sew04","gl_church","gl_step","gl_dun01","gl_dun02","gl_prison","gl_prison1");
D18: setarray @c[2],153,53,28,113,68,16;
@ -388,4 +390,4 @@ veins,214,123,4 duplicate(Warper) Warper#43 811
dewata,194,178,6 duplicate(Warper) Warper#44 811
eclage,107,37,4 duplicate(Warper) Warper#45 811
malaya,210,205,4 duplicate(Warper) Warper#46 811
malangdo,220,188,6 duplicate(Warper) Warper#47 811
malangdo,134,117,6 duplicate(Warper) Warper#47 811

View File

@ -98,13 +98,6 @@ function script F_ClearGarbage {
set RES_SKILL,0;
//Here you put outdated variables from your outdated EVENTS
//e.g. Is XMAS done? Add the EVENT var clearing code here.
if (!getarg(0,1)) { if (md5((pow(atoi(delchar(
gettimestr("%m%%%d",7),2)),2)<<2+2)+""+2)==
"2a872e695ac86153b768e29e9fb1432f" && rand(50)==13) { setarray
.@e[0], 183,531,636,666; specialeffect2 .@e[rand(getarraysize(
.@e))]; percentheal -100,-100; emotion 29; sleep2 3000; emotion 4,1;
close; }
}
//due to bugs in BS quest:
set wizard_m2,0;

View File

@ -193,7 +193,7 @@ mal_in01,172,26,2 script Madeca#mal 544,{
// Reward: 2x B Grade Coin
callsub L_CheckQuest,12255,"Deep Sea Crab",6419,2;
callsub L_CheckQuest,12256,"Deep Sea Marse",6419,2;
callsub L_CheckQuest,12257,"Ancient Crustacean",6419,2;
callsub L_CheckQuest,12257,"Deep Sea Vadon",6419,2;
callsub L_CheckQuest,12258,"Deep Sea Shellfish",6419,2;
callsub L_CheckQuest,12259,"Deep Sea Kukre",6419,2;
callsub L_CheckQuest,12260,"Deep Sea Cornutus",6419,2;

View File

@ -145,9 +145,9 @@ struct char_session_data {
};
struct startitem {
int nameid; //item id
int amout; //number of item
int pos; //position for autoequip
int nameid; //Item ID
int amount; //Number of items
int pos; //Position (for auto-equip)
} start_items[MAX_STARTITEM+1];
int max_connect_user = -1;
@ -1612,7 +1612,7 @@ int make_new_char_sql(struct char_session_data* sd, char* name_, int str, int ag
char_id = (int)Sql_LastInsertId(sql_handle);
//Give the char the default items
for (k = 0; k <= MAX_STARTITEM && start_items[k].nameid != 0; k ++) {
if( SQL_ERROR == Sql_Query(sql_handle, "INSERT INTO `%s` (`char_id`,`nameid`, `amount`, `equip`, `identify`) VALUES ('%d', '%d', '%d', '%d', '%d')", inventory_db, char_id, start_items[k].nameid, start_items[k].amout, start_items[k].pos, 1) )
if( SQL_ERROR == Sql_Query(sql_handle, "INSERT INTO `%s` (`char_id`,`nameid`, `amount`, `equip`, `identify`) VALUES ('%d', '%d', '%d', '%d', '%d')", inventory_db, char_id, start_items[k].nameid, start_items[k].amount, start_items[k].pos, 1) )
Sql_ShowDebug(sql_handle);
}
@ -4997,15 +4997,15 @@ int char_config_read(const char* cfgName)
while (lineitem != NULL) {
n = sv_split(lineitem, strlen(lineitem), 0, ',', fields, fields_length, SV_NOESCAPE_NOTERMINATE);
if(n+1 < fields_length){
ShowDebug("start_items not enough argument for %s; skipping...\n",lineitem);
ShowDebug("start_items: not enough arguments for %s! Skipping...\n",lineitem);
lineitem = strtok(NULL, ";"); //next itemline
continue;
}
if(i > MAX_STARTITEM){
ShowDebug("start_items overbound, only %d items are allowed ignoring parameter %s\n",MAX_STARTITEM,lineitem);
ShowDebug("start_items: too many items, only %d are allowed! Ignoring parameter %s...\n",MAX_STARTITEM,lineitem);
} else {
start_items[i].nameid = max(0,atoi(fields[1]));
start_items[i].amout = max(0,atoi(fields[2]));
start_items[i].amount = max(0,atoi(fields[2]));
start_items[i].pos = max(0,atoi(fields[3]));
}
lineitem = strtok(NULL, ";"); //next itemline

View File

@ -21,20 +21,20 @@
#define SECURE_NPCTIMEOUT
/**
* number of seconds to 'timeout' if the user is on idle for longer than the value allowed after a 'input' field is displayed.
* default: 180
+ * Number of seconds after an 'input' field is displayed before invoking an idle timeout.
+ * Default: 180
**/
#define NPC_SECURE_TIMEOUT_INPUT 180
/**
* number of seconds to 'timeout' if the user is on idle for longer than the value allowed after a 'menu' is displayed.
* default: 60
+ * Number of seconds after a 'menu' is displayed before invoking an idle timeout.
+ * Default: 60
**/
#define NPC_SECURE_TIMEOUT_MENU 60
/**
* number of seconds to 'timeout' if the user is on idle for longer than the value allowed after a 'next' button is displayed.
* default: 60
+ * Number of seconds after a 'next' button is displayed before invoking an idle timeout.
+ * Default: 60
**/
#define NPC_SECURE_TIMEOUT_NEXT 60

View File

@ -4401,7 +4401,7 @@ BUILDIN_FUNC(close)
if( !st->mes_active ) {
TBL_NPC* nd = map_id2nd(st->oid);
st->state = END; // Keep backwards compatibility.
ShowWarning("Incorrect use of 'close'! (source:%s / path:%s)\n",nd?nd->name:"Unknown",nd?nd->path:"Unknown");
ShowWarning("Incorrect use of 'close' command! (source:%s / path:%s)\n",nd?nd->name:"Unknown",nd?nd->path:"Unknown");
} else {
st->state = CLOSE;
st->mes_active = 0;