I'm trying to add a vendcheck feature to prevent players vending from getting prizes but it only seems to affect normal vendors and not those that are @autotrade, they still seem to get the prize once 2 hours has past.
I'm using Stolao's Daily Login Reward 1.48.
This is what the script looks like, the changes I made are in red.
- script LOGIN -1,{ OnWhisperGlobal: OnLoginCmnd: OnPCLoginEvent: sleep2 1000+.Rest*60000; set .@i,(gettime(7)*365*24)+(gettime(8)*24)+gettime(3); set .@g,getarraysize(.Rewards); if(checkvending() > 0) {dispbottom "You seem to be vending, you cannot claim a daily prize until you stop and relogin."; end; } if(.@i >= (#LastDailyReward + .MinWait)){ if(.@i < #LastDailyReward + .MaxWait){ set #DRewardCon,#DRewardCon+1; } else { set #DRewardCon,1; } if(#DRewardCon*2 > .@g-1){ set .@p,.Rewards[.@g-2]; set .@q,.Rewards[.@g-1]; } else { set .@p,.Rewards[#DRewardCon*2-2]; set .@q,.Rewards[#DRewardCon*2-1]; } if(.Mode&1&&.@p && checkvending() == 0) { if(!checkweight(.@p,.@q)){ dispbottom "You seem to be oveweight, put some stuff away and relog to claim prize"; end; } else { getitem .@p,.@q; dispbottom ""+.@q+" "+getitemname(.@p)+""; } } if(.Mode&2) set .@A,#DRewardCon*.ZMulti; if(.Mode&8) set .@A,.@A+.@q; if(.Mode&2||.Mode&8){ setd .PointType$,getd(.PointType$)+.@A; dispbottom ""+.@A+" "+.PointType$+""; } if(.Mode&4){ set .@B,#DRewardCon*.XPMulti[0]; set .@C,#DRewardCon*.XPMulti[1]; } if(.Mode&16){ set .@B,.@B+.@q; set .@C,.@C+.@q; } if(.Mode&4||.Mode&16){ getexp .@B,.@C; } if(.Mode&32){ for(set .@x,0; .@x < getarraysize(.BuffInfo); set .@x,.@x+4){ if(#DRewardCon % .BuffInfo[.@x+1] == 0) sc_start .BuffInfo[.@x], .BuffInfo[.@x+2]*60000, .BuffInfo[.@x+3]; } } dispbottom "You have collected your daily reward, for "+#DRewardCon+" day"+((DRewardCon>1)?"s":"")+" in a row."; set #LastDailyReward,.@i; } else { dispbottom "You have "+(#LastDailyReward + .MinWait-.@i)+" hours till your next reward"; } end;
OnInit:
I added two checks to prevent autotraders from getting the prize but they seem to still get it, anyone have any ideas on what im doing wrong.
Question
windston
I'm trying to add a vendcheck feature to prevent players vending from getting prizes but it only seems to affect normal vendors and not those that are @autotrade, they still seem to get the prize once 2 hours has past.
I'm using Stolao's Daily Login Reward 1.48.
This is what the script looks like, the changes I made are in red.
I added two checks to prevent autotraders from getting the prize but they seem to still get it, anyone have any ideas on what im doing wrong.
Link to comment
Share on other sites
3 answers 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.