* Fixed bugreport:6619 with correct ammo view id in /doc/item_db.txt
* Slight cleanup in /doc/atcommands.txt * Added quest sample NPC in /doc/npc_test_quest.txt * Added an additional example in /doc/whisper_sys.txt to show extended usage git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16742 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
7b7e244fef
commit
b3135cd23a
@ -1122,7 +1122,9 @@ Opens the trade window with the specified player.
|
||||
|
||||
|
||||
---------------------------------------
|
||||
@changelook: Changes the player's appearance (headgear).
|
||||
@changelook <ID>
|
||||
|
||||
Changes the player's appearance (headgear).
|
||||
|
||||
|
||||
---------------------------------------
|
||||
@ -1201,20 +1203,21 @@ Revives all players on the server.
|
||||
Toggles the visibility of an NPC's sprite.
|
||||
|
||||
|
||||
---------------------------------------
|
||||
@shownpc: Unhides a NPC.
|
||||
|
||||
|
||||
---------------------------------------
|
||||
@loadnpc <path>
|
||||
|
||||
Loads an NPC script by path.
|
||||
|
||||
|
||||
Example:
|
||||
@loadnpc npc/custom/jobmaster.txt
|
||||
|
||||
---------------------------------------
|
||||
@unloadnpc <NPC Name>
|
||||
|
||||
Unloads an NPC.
|
||||
|
||||
Example:
|
||||
@unloadnpc Job Master
|
||||
|
||||
|
||||
---------------------------------------
|
||||
|
@ -3,7 +3,7 @@
|
||||
//===== By: ==================================================
|
||||
//= rAthena Dev Team
|
||||
//===== Current Version: =====================================
|
||||
//= 20120420
|
||||
//= 20120904
|
||||
//===== Description: =========================================
|
||||
//= Explanation of the item_db.txt file and structure.
|
||||
//============================================================
|
||||
@ -143,8 +143,8 @@ View: For normal items, defines a replacement view-sprite for the item (eg:
|
||||
5: Grenades
|
||||
6: Shuriken
|
||||
7: Kunai
|
||||
7: Cannonballs
|
||||
7: Throwable Items (Sling Item)
|
||||
8: Cannonballs
|
||||
9: Throwable Items (Sling Item)
|
||||
|
||||
Script: Script to execute when the item is used/equipped.
|
||||
|
||||
|
44
doc/sample/npc_test_quest.txt
Normal file
44
doc/sample/npc_test_quest.txt
Normal file
@ -0,0 +1,44 @@
|
||||
// Before installing an NPC like the one below, you would
|
||||
// need to add the quest to /db/quest_db.txt - e.g:
|
||||
// 9000,0,1002,3,0,0,0,0,"3 Splats Please!"
|
||||
|
||||
|
||||
prontera,90,95,1 script Jelly 123,{
|
||||
set .@n$, "["+strnpcinfo(1)+"]";
|
||||
if(checkquest(9000) == -1) goto L_Start;
|
||||
if(checkquest(9000,HUNTING) == 2) goto L_Reward;
|
||||
if(checkquest(9000) == 2) goto L_Done;
|
||||
|
||||
L_Start:
|
||||
mes .@n$;
|
||||
mes "Hey there! Would you help me?";
|
||||
next;
|
||||
switch(select("I'd rather not:What's up?")){
|
||||
case 1:
|
||||
mes .@n$;
|
||||
mes "I didn't want your help anyway!";
|
||||
close;
|
||||
|
||||
case 2:
|
||||
mes .@n$;
|
||||
mes "Those Porings are weirding me out.";
|
||||
mes "Would you kill 3 for me?";
|
||||
setquest 9000; // Adds the quest to your Quest Window.
|
||||
close;
|
||||
}
|
||||
}
|
||||
close;
|
||||
|
||||
L_Reward:
|
||||
mes .@n$;
|
||||
mes "Awesome! Than you =)";
|
||||
getexp 10000,0;
|
||||
dispbottom "You have been rewarded with 10,000 Base Exp.";
|
||||
completequest 9000;
|
||||
close;
|
||||
|
||||
L_Done:
|
||||
mes .@n$;
|
||||
mes "Thanks again for doing that for me =)";
|
||||
close;
|
||||
}
|
@ -36,3 +36,35 @@ OnWhisperGlobal:
|
||||
message @whispervar2$,"You have been reported for "+@whispervar1$+".";
|
||||
end;
|
||||
}
|
||||
|
||||
The Whisper System is also useful for hidden event handler NPCs (NPCs that don't
|
||||
have a sprite on a map for you to click). E.g:
|
||||
|
||||
OnWhisperGlobal:
|
||||
if (getgmlevel()<80) goto L_NotGM;
|
||||
if (@whispervar0$ == "event1") goto L_Event1;
|
||||
if (@whispervar0$ == "event2") goto L_Event2;
|
||||
if (@whispervar0$ == "event3") goto L_Event3;
|
||||
|
||||
// If the string sent to this NPC doesn't contain any of the above:
|
||||
else goto L_NoVar;
|
||||
end;
|
||||
|
||||
L_NotGM:
|
||||
dispbottom "NPC : You do not have sufficient access to whisper in my ear.";
|
||||
end;
|
||||
|
||||
L_NoVar:
|
||||
dispbottom "NPC : Sorry, i do not recognise that command.";
|
||||
end;
|
||||
|
||||
L_Event1:
|
||||
if (@whispervar1$ == "start"){
|
||||
// Execute scripts to start Event1
|
||||
}
|
||||
if (@whispervar1$ == "stop"){
|
||||
//Execute scripts to forcefully stop Event1
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user