ParIsMakulit Posted April 6, 2015 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 117 Reputation: 6 Joined: 06/03/12 Last Seen: September 13, 2017 Share Posted April 6, 2015 I'm requesting for WoE Prize Giver Playing 30 Minutes above in War of Emperium will be given Prize or Reward Then Playing 29 minutes below in War of Emperium will not be given Prize or Reward is this possible ? anyone can help me with this problem ? Quote Link to comment Share on other sites More sharing options...
Kurofly Posted April 6, 2015 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 283 Reputation: 31 Joined: 07/08/14 Last Seen: January 15, 2022 Share Posted April 6, 2015 I'll try to make something for you but I don't have much time so I'll only do the counting time part. See you in a bit ^^ Hello there, I'm back! I made a script which will count how much time each player has been on the woe maps during the woe. The time played will be stored in array '.<player name>_WoeTimes' so that you can get a reward from a previous woe if you couldn't connect in time. This time is counted in seconds. If you're a gm and you want to check this variable for a specified player, type @getwoetime <player name> exemple: '@getwoetime kuro' will display "player kuro lasted x seconds in woe last woe" I made this just so you can check if the script works fine. Here it is : - script WoeTimer -1,{ /*----------------------------------------- setting labels ---------------------------------------------------*/ OnInit: setarray .Woe_Maps$[0] , "aldeg_cas01"; // >>PUT ALL OF YOUR ACTIVE WOE MAPS HERE<< for (.@i = 0 ; .@i < getarraysize(.Woe_Maps$) ; .@i++) { setmapflag .Woe_Maps$[.@i],mf_loadevent; } bindatcmd "getwoetime",strnpcinfo(3)+"::OnCommand",80; end; OnAgitStart: .Woe = 1; setarray .players$[0] , ""; end; OnAgitEnd: .Woe = 0; end; /*----------------------------------------- end of setting labels ---------------------------------------------*/ OnPCLoadMapEvent: getmapxy .@map$,.@x,.@y,0; for (.@i = 0 ; .@i < getarraysize(.Woe_Maps$) ; .@i++) { if (.Woe && .@map$ == .Woe_Maps$[.@i]) addtimer 1000,strnpcinfo(3)+"::OnSec"; } end; OnSec: .@player_name$ = strcharinfo(0); setarray getd( "."+.@player_name$+"_WoeTimes[getarraysize(."+.@player_name$+"_WoeTimes)]") , getd( "."+.@player_name$+"_WoeTimes[getarraysize(."+.@player_name$+"_WoeTimes)]") + 1; //add 1 second to counter for (.@i = 0 ; .@i < getarraysize(.players$) ; .@i++) { if (.@player_name$ != .players$[.@i]) setarray .players$[getarraysize(.players$)+1] , .@player_name$; }//get the name of all players who go to woe deltimer strnpcinfo(3)+"::OnSec"; if (.Woe) { addtimer 1000,strnpcinfo(3)+"::OnSec"; } end; OnCommand: /* @getwoetime <player name> */ //it will display the number of seconds the player has lasted in his last woe if (.@atcmd_numparameters < 1) { dispbottom "error" ; end; } if (.@atcmd_numparameters > 2) { dispbottom "error, script continue" ; } if (.@atcmd_numparameters == 1) { dispbottom "player "+.@atcmd_parameters$[0]+" lasted "+getd("."+.@atcmd_parameters$[0]+"_WoeTimes[getarraysize(."+.@atcmd_parameters$[0]+"_WoeTimes)-1]")+" seconds in woe last woe." ; end; } } You just have to set the maps on which you want to activate this script by editting the first line. I'm sorry if it's a bit unreadable, I made it quick. I tested it and it works so I guess it's the most important. I don't have time to do further scripting today so I'll let you with this. You can use this script with another npc which would give the rewards. This npc would get the '.<player name>_WoeTimes' from the one I made and give rewards accordingly. Let me know a bit more about how you want to manage the "reward giving" thing and I'll gladly make that for you but only if you can wait a few days ^^ Quote Link to comment Share on other sites More sharing options...
Question
ParIsMakulit
I'm requesting for WoE Prize Giver
Playing 30 Minutes above in War of Emperium will be given Prize or Reward
Then Playing 29 minutes below in War of Emperium will not be given Prize or Reward
is this possible ? anyone can help me with this problem ?
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.