Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/27/21 in all areas

  1. New Version: Working on latest Git: 6672bf Refactored 'item_vending.txt' to YAML Format 'item_vending_db.yml'. Fixed an issue regarding bound items in the buyer's inventory. Added a config to enable/disable buying with bounded items. Prevent buying if seller has the Max Item in the inventory (30,000 ea). Added GetComma for a better visualization of the amount of zeny received (Vending Report). Code clean-up. Status: Pending Approval.
    2 points
  2. as a start do not use addrid and do not set the exp variable , use getexp command , and you can provide the char id to it so player attaching is not needed and this is wrong (.mobid = killedrid;) , just use it as it is or set it to ".@" var like (.@mobid = killedrid;) and what you want is just math , .@exp = (original_exp/100)*70;
    1 point
  3. How to use *addrid script command properly Method 1: Exploits its multi-concurrent run -> use *addrid right before ending the script addrid will run multiple instances equal to number of player attached, which, not entirely a bad thing when use properly, as shown below, don't have to use loop prontera,155,179,5 script kickall 1_F_MARIA,{ if ( getgmlevel() < 99 ) end; mes "I will kick all players after this dialog close"; mes "Exclude: autotrader, GMs, wondering in town."; close2; addrid 0; if ( getgmlevel() >= 60 ) end; // don't kick GMs if ( checkvending() & 2 ) end; // shouldn't kick @autotraders if ( getmapflag( strcharinfo(3), mf_town ) ) end; // doesn't kick anyone in the town atcommand "@kick "+ strcharinfo(0); end; } Method 2: Get all the RID in an array -> use donpcevent as calling a function, within that label, store the account IDs the preferred method, this method is safe from running multiple instances prontera,155,182,5 script getallusers 1_F_MARIA,{ donpcevent strnpcinfo(0)+"::OnGetAID"; // treat this as calling a function to get online player's account ID for ( .@i = 0; .@i < .c; ++.@i ) announce (.@i +1)+". "+ rid2name(.aid[.@i]), bc_all; end; OnGetAID: .c = 0; addrid 0; .aid[.c++] = getcharid(3); end; } - script getallmap HIDDEN_NPC,{ end; OnTest: donpcevent strnpcinfo(0)+"::OnGetAID"; for ( .@i = 0; .@i < .c; ++.@i ) announce (.@i +1)+". "+ rid2name(.aid[.@i]), bc_all; end; OnGetAID: .c = 0; addrid 5, 0, "payon"; // only attach to everyone inside payon map .aid[.c++] = getcharid(3); end; OnInit: bindatcmd "test", strnpcinfo(0)+"::OnTest"; end; } guild_vs2,0,0,0 script getareausers HIDDEN_NPC,{ end; OnTest: donpcevent strnpcinfo(0)+"::OnGetAID"; for ( .@i = 0; .@i < .c; ++.@i ) announce (.@i +1)+". "+ rid2name(.aid[.@i]), bc_all; end; OnGetAID: .c = 0; addrid 4, 0, 46, 46, 53, 53; // attach everyone in the map 'guild_vs2' of (46,46,53,53) area .aid[.c++] = getcharid(3); end; OnInit: bindatcmd "test2", strnpcinfo(0)+"::OnTest"; end; }
    1 point
×
×
  • Create New...