under this line src/map/atcommand.c#L2104
try add these
if( position == EQP_HAND_L || position == EQP_HAND_R ){
clif_displaymessage( fd,"Both Left Right hand cant be refine." );
return 0;
}
if you wanna do it this is script....
you have to duplicate the same NPC on all your "0" spot ....1 NPC = 1 coordinate effect ...
however, adding Map effects like this should be done through map edit instead of npc script.
You want to check if the user has fewer than three of an array of items?
setarray .@rental[0],990,991,992,993;
.@itmCnt = 0;
for (.@i = 0; .@i < getarraysize(.@rental); .@i++) {
if (countitem(.@rental[.@i])) {
.@itmCnt++;
}
}
if (2 < .@itmCnt) {
mes "You can have a maximum of two out of the following list:";
for (.@i = 0; .@i < getarraysize(.@rental); .@i++) {
mes "" + getitemname(.@rental[.@i]) + "";
}
close;
}
This should be what you're looking for, then.
https://gist.github.com/S-anasol/6589054
short version by me
and
quest_db.txt
4999,0,0,0,0,0,0,0,"Extermination Crisis"
5001,0,1037,50,0,0,0,0,"King Froggie VII's revenge"
5002,0,0,0,0,0,0,0,"The hero of the frogs"
5003,0,0,0,0,0,0,0,"Frog Hiding Skill"
5004,0,1099,50,0,0,0,0,"Food Shortage"
*npcskilleffect <skill id>,<number>,<x>,<y>;
*npcskilleffect "<skill name>",<number>,<x>,<y>;
This command behaves identically to 'skilleffect', however, the effect will not
be centered on the invoking character's sprite, nor on the NPC sprite, if any,
but will be centered at map coordinates given on the same map as the invoking
character.
Put this in a 'freeloop' and you'll have your effect.
Something like this
freeloop(1);
while(!.i){
*npcskilleffect <skill id>,<number>,<x>,<y>;
*sleep {<milliseconds>};
}
Sleep:
*sleep {<milliseconds>};
*sleep2 {<milliseconds>};
*awake "<NPC name>";
These commands are used to control the pause of a NPC.
sleep and sleep2 will pause the script for the given amount of milliseconds.
Awake is used to cancel a sleep. When awake is called on a NPC it will run as
if the sleep timer ran out, and thus making the script continue. Sleep and sleep2
basically do the same, but the main difference is that sleep will not keep the rid,
while sleep2 does.
Examples:
sleep 10000; //pause the script for 10 seconds and ditch the RID (so no player is attached anymore)
sleep2 5000; //pause the script for 5 seconds, and continue with the RID attached.
awake "NPC"; //Cancels any running sleep timers on the NPC 'NPC'.
Freeloop:
*freeloop(<toggle>)
Toggling this to enabled (1) allows the script instance to bypass the infinite loop
protection, allowing your script to loop as much as it may need. Disabling (0) will
warn you if an infinite loop is detected.
Example:
freeloop(1); // enable script to loop freely
//Be aware with what you do here.
for ( set .@i,0; .@i<.@bigloop; set .@i, .@i+1 ) {
dothis;
// will sleep the script for 1ms when detect an infinity loop to
// let rAthena do what it need to do (socket, timer, process, etc.)
}
freeloop(0); // disable
for ( set .@i,0; .@i<.@bigloop; set .@i, .@i+1 ) {
dothis;
// throw an infinity loop error
}