- 0
Sign in to follow this
Followers
0
Stop script if char's MAC address matches 2 or more other player's on same map.
Asked by
jTynne
-
Recently Browsing 0 members
No registered users viewing this page.

As the title suggests, I need a bit of code that will stop a script if the invoking character's "last_mac" column from login table.. using Harmony.. has two or more clients on the same map.
Currently, I have it set up that when a player enters the event map, it inserts their MAC address into a database named "woe_records", and then continues on to another bit of code which awards participation points every 30 seconds they're on the event map.
What I need is for said script to stop running if there are two or more players on the current map who share the same MAC adress.
Below is the current script:
aldeg_cas02,1,1,1 script aldeg_cas02#timer -1,{OnPCLoadMapEvent:getmapxy (.@map$, .@x, .@y, 0); if(agitcheck() > 0 && .@map$ == "aldeg_cas02" && gettime(4) == 0) {dispbottom "[WoE] Welcome to the War of Emperium. You will gain participation points for every 30 seconds you're on the map based on the number of players also in the castle. Good luck!";attachnpctimer;initnpctimer;}end; OnTimer30000:getmapxy (.@map$, .@x, .@y, 0); if(.@map$ != "aldeg_cas02") {detachnpctimer;stopnpctimer;end;}if(agitcheck() > 0 && .@map$ == "aldeg_cas02" && gettime(4) == 0) {detachnpctimer;set $aldeg_particip,getmapusers("aldeg_cas02")/2;set #woe_particip,#woe_particip+$aldeg_particip;stopnpctimer;dispbottom "[WoE] You've earned "+$aldeg_particip+" WoE participation points for being on the map for 30 seconds! You now have "+#woe_particip+" participation points.";attachnpctimer;initnpctimer;end;}} aldeg_cas02 mapflag loadeventShare this post
Link to post
Share on other sites