Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/17/13 in Posts

  1. Please refer to the Loc section in wiki
    1 point
  2. change setarray .@Default[0],13517,1; set .@i, rand(1,.@Total); if (rand(1,100) > getd(".@P"+.@i+"[0]")) { for(set .@j,0; .@j<getarraysize(.@Default); set .@j,.@j+2) { getitem .@Default[.@j], .@Default[.@j+1]; if(!.@k[0]) setarray .@k[0], .@Default[.@j], .@Default[.@j+1]; } } else{ for(set .@j,1; .@j<getarraysize(getd(".@P"+.@i)); set .@j,.@j+2) { getitem getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); if (!.@k[0]) { set .@gz,.@i; setarray .@k[0], getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); break; } } } into do{ set .@i, rand(1,.@Total); }while( rand(1,100) > getd(".@P"+.@i+"[0]") ); for(set .@j,1; .@j<getarraysize(getd(".@P"+.@i)); set .@j,.@j+2) { getitem getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); if (!.@k[0]) { set .@gz,.@i; setarray .@k[0], getd(".@P"+.@i+"["+.@j+"]"), getd(".@P"+.@i+"["+(.@j+1)+"]"); break; } }
    1 point
  3. if( .@gz && .@gz <= 10 ) announce "Congratulations! "+strcharinfo(0)+" just received "+getitemname(.@k[0])+" x "+.@k[1]+" from Lotti Girl (prontera 139 173)!",0;
    1 point
  4. 600 = 6% chance ? or 600 = 600% chance ? 6 = 6% 60 = 60% value should be within 1 ~ 100
    1 point
  5. 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; }
    1 point
  6. 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.
    1 point
  7. 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.
    1 point
  8. 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"
    1 point
  9. *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 }
    1 point
×
×
  • Create New...