Jump to content
  • 0
Sign in to follow this  
rans

Loop Doubt or help me understand

Question

Hi,
I'm planning to create an item that will only work OUTSIDE of pvp and gvg mapflags. so it come to my mind that i can put a loop script in that item. every seconds it will check if the map has pvp or gvg mapflag. now my doubt is will this loop script have an effect on my server? like if every player has the item it will make the server lag? or no change at all?

thanks in advance for your answers :)

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Hi

its an equipment that will automatically turn of when mapflag pvp,gvg is on

i've scripted it like this

set .pvpcheck,2; //meaningless
    while ( .pvpcheck < 5){
    if( getmapflag( strcharinfo(3),mf_pvp ) || getmapflag( strcharinfo(3),mf_gvg ) ){
    sleep2 500;
    message strcharinfo(0), "You can't use Non Pvp/Gvg items on PvP or GvG Maps, Your items will be taken off";
    nude;
    end;
    }
    sleep2 1000;
    }


i am not sure if my code are right but it works fine. my only doubt if it will cause lags on my server if too many players are wearing it.

Share this post


Link to post
Share on other sites
  • 0

Well i'm not so sure if that will work on command i mean if somebody is wearing the items on a normal map and i hosted a pvp event so i will just use the command @pvpon 

it will not automatically take off the equipment so they can still use it.

Share this post


Link to post
Share on other sites
  • 0

@@Ranz

 

depends on your setting here: conf/battle/items.conf

 

// Unequip the equipments that has disabled by map_zone_db.conf ?
// 0 : disabled equipments and cards are nullify (official)
// 1 : disabled equipments are unequip, disabled cards are nullify
// 2 : disabled equipments are nullify, disabled cards will caused the equipment to unequip
// 3 : disabled equipments are unequip, disabled cards will caused the equipment to unequip (1+2)
unequip_restricted_equipment: 0

Share this post


Link to post
Share on other sites
  • 0

 

@@Ranz

 

depends on your setting here: conf/battle/items.conf

 

// Unequip the equipments that has disabled by map_zone_db.conf ?
// 0 : disabled equipments and cards are nullify (official)
// 1 : disabled equipments are unequip, disabled cards are nullify
// 2 : disabled equipments are nullify, disabled cards will caused the equipment to unequip
// 3 : disabled equipments are unequip, disabled cards will caused the equipment to unequip (1+2)
unequip_restricted_equipment: 0

My settings in that is 3

 

the situation is when i use @pvpon the item will not automatically off. but if i manually take it off and try to put it back. i cant equip it. 

 

thats why im going to use a script with loop check so it will automatically nude the equipment when it detects a pvp mapflag.

Share this post


Link to post
Share on other sites

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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.