rongmauhong Posted May 31, 2018 Posted May 31, 2018 Hi, I'm trying to fix the disconnect issue from this script but no luck Could you find the error? Thanks - script AntiBot -1,{ OnPCLoginEvent: @mobCount = 0; end; OnPCLogoutEvent: if (getgmlevel() < 99) { callsub S_UnHide; } end; OnNPCKillEvent: if (@checking) end; .@map$ = strcharinfo(3); if (.@map$ == "mosk_dun03" || .@map$ == "bra_dun02" || .@map$ == "ice_dun03" || .@map$ == "um_fild02" || .@map$ == "um_fild04" || .@map$ == "mosk_dun03" || .@map$ == "ra_fild01" || .@map$ == "yuno_fild11" ) { @mobCount++; if (@mobCount >= (.count-5)) { message strcharinfo(0), "Anti Bot will appear after "+ (.count - @mobCount) +" mobs."; } if (@mobCount >= .count) { @mobCount = 0; @checking = 1; attachnpctimer; initnpctimer; callsub S_Hide; .@A = rand(5); .@B = rand(5); @Answer = .@A + .@B; mes "^0000FF[ Anti Marco ]^000000"; mes "A = "+.@A+" B = "+.@B; mes "A + B?"; input @Input; if (@Input != @Answer) { @checking = 0; stopnpctimer; detachnpctimer; callsub S_UnHide; Zeny -= 100000; warp "prontera", 156,191; } else { @checking = 0; next; mes "^0000FF[ Anti Bot ]^000000"; mes "...."; percentheal 100,100; stopnpctimer; detachnpctimer; callsub S_UnHide; Zeny += 50000; close; } end; } end; } end; S_Hide: setoption 0x2,1; // Hide in effect. setoption 0x2000,1; // Ruwach is in effect. atcommand "@battleignore"; return; S_UnHide: setoption 0x2,0; // Hide in effect. setoption 0x2000,0; // Ruwach is in effect. atcommand "@battleignore"; return; OnTimer30000: Zeny -= 100000; warp "prontera", 156,191; callsub S_UnHide; end; OnInit: .count = 100; // 100 mobs end; } Quote
0 AnnieRuru Posted May 31, 2018 Posted May 31, 2018 [Error]: script_set_reg: failed to set param 'Zeny' to -37769. [Debug]: Source (NPC): AntiBot (invisible/not on a map) make sure you put Zeny check before deducting Zeny... and probably check Zeny if overflow if the condition is true just put atcommand "@kick "+ strcharinfo(0); if you want to kick players 1 Quote
Question
rongmauhong
Hi,
Could you find the error? Thanks
I'm trying to fix the disconnect issue from this script but no luck
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.