//============================================================ prontera.gat,150,184,5scriptHeal & Buffer~::Heal & Buffer~977,{ // -o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o- \\ // Header - Please include this header in your Walk Enabled NPCs to control distance errors // Set the status to "In Use" (multiplayer) set .inUse, .inUse + 1; // Reset the current lock time while the user talk with the NPC set .curLockT,0; // -o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o- \\ mes "[Heal & Buffer]"; mes "Healing..."; percentheal 100,100; misceffect 408; skilleffect 28,32000; next; mes "[Heal & Buffer]"; mes "Buffing..."; sc_start 32,240000,10;//Increase AGI sc_start 30,240000,10;//Blessing sc_start 35,240000,10;//Impositio skilleffect 74,0; //Effect Magnificat sc_start 40,240000,10;//Magnificat sc_end SC_Poison; sc_end SC_Silence; sc_end SC_Blind; sc_end SC_Confusion; sc_end SC_Curse; sc_end SC_Hallucination; emotion e_no1; set .inUse, .inUse - 1; close; end; R_No: mes "[Heal & Buffer]"; mes "Alright, come back if you need help"; close2; set .inUse, .inUse - 1; end; OnInit: // Define the coordinates for this NPC (you can use 0,400/0,400 for a full map movement) // Horizontal coordinates set .minX,148; set .maxX,163; // Vertical coordinates set .minY,184; set .maxY,164; // Define the min/max distance for each movement set .minD,0; set .maxD,10; // Define stopped steps before change the status back to "Free to walk" set .maxLock,30; // Set the speed for this NPC (50=Faster / 250=Slower) npcspeed 200; // Start the movements initnpctimer; end; // Set here the time for the next movement (ms) OnTimer3000: if (.inUse) { set .curLockT, .curLockT + 1; if (.curLockT > .maxLock) set .inUse, 0; } else { getmapxy .map$,.x,.y,1; set .curX, callfunc("NPCWalk",.minX, .maxX,.minD,.maxD,.x); set .curY, callfunc("NPCWalk",.minY, .maxY,.minD,.maxD,.y); npcwalkto .curX, .curY; } stopnpctimer; initnpctimer; end; onTouch: npctalk "Do you need a Heal young adventurer?"; emotion e_hmm; end; } // Function to calculate one single coordinate functionscriptNPCWalk{ set .CP, getarg(4); set .DST, rand(getarg(2),getarg(3)); if (rand(2)) set .CP, .CP + .DST; else set .CP, .CP - .DST; if (.CP < getarg(0)) set .CP, .CP + .DST; if (.CP > getarg(1)) set .CP, .CP - .DST; return .CP; }