Jump to content
  • 0

HELP with my script! Why only work for char with gm level higher than 0?


Lord Ganja

Question


  • Group:  Members
  • Topic Count:  141
  • Topics Per Day:  0.03
  • Content Count:  444
  • Reputation:   22
  • Joined:  06/18/12
  • Last Seen:  

Hello. Could you help me with my script? Why does it work only for chars with gm level higher than 0?

Whenever I warped in pvp_2vs2 using my gm account. The script works well.

BUT, when I use a normal char the script stops. It doesn't trigger the timer script.

 

When I use GM Account, everytime I switched headgear (upper,mid,or low) it always trigger

the script on the timer.

 

But, when using Normal Account, the scripts in the "OnTimer500:" are not triggered.

 

Any help please? Thanks!

 

-    script    autochange    -1,{
OnPCLoadMapEvent:
    getmapxy(.@map$,.@x,.@y,0);
    if(.@map$=="pvp_2vs2") {
    set .@equip_top, getequipid(1);
    set .@equip_mid, getequipid(9);
    set .@equip_low, getequipid(10);
    atcommand "@changelook 1 0";
    atcommand "@changelook 2 0";
    atcommand "@changelook 3 0";
    attachnpctimer ""+strcharinfo(0)+"";
    initnpctimer;
    end;
    } else {
    end;
    }

OnTimer500:
if( .@equip_top != getequipid(1) ) {
    set .@equip_top, getequipid(1);
    atcommand "@changelook 1 0";
    }
if( .@equip_mid != getequipid(9) ) {
    set .@equip_mid, getequipid(9);
    atcommand "@changelook 2 0";
    }
if( .@equip_low != getequipid(10) ) {
    set .@equip_low, getequipid(10);
    atcommand "@changelook 3 0";
    }
stopnpctimer;
initnpctimer;
end;

OnPCLogoutEvent:
//if (getgmlevel() > 0) end;
    getmapxy(.@map$,.@x,.@y,0);
    if(.@map$=="pvp_2vs2") {
    stopnpctimer;
    end;
    }
}

pvp_2vs2    mapflag    loadevent
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...