TiMz Posted February 17, 2014 Posted February 17, 2014 Script only reads the if and not the else part. Which part is written badly? OnPCDieEvent: getmapxy .@map$,.@x,.@y,0; if ( getgroupid() > 3 || killedrid == getcharid(3)) end; else (.@map$ == "arena") { announce rid2name(killerrid)+" wins against "+strcharinfo(0)+" at pvp!",bc_all; warp "prontera",155,180; end; } end; } Quote
sandbox Posted February 17, 2014 Posted February 17, 2014 Mind explaining the output that you want? Quote
Kido Posted February 17, 2014 Posted February 17, 2014 Script only reads the if and not the else part. Which part is written badly? OnPCDieEvent: getmapxy .@map$,.@x,.@y,0; if ( getgroupid() > 3 || killedrid == getcharid(3)) end; else (.@map$ == "arena") { announce rid2name(killerrid)+" wins against "+strcharinfo(0)+" at pvp!",bc_all; warp "prontera",155,180; end; } end; } shouldn't be like? OnPCDieEvent: getmapxy .@map$,.@x,.@y,0; if ( getgroupid() > 3 || killedrid == getcharid(3)){ end; } else (.@map$ == "arena") { announce rid2name(killerrid)+" wins against "+strcharinfo(0)+" at pvp!",bc_all; warp "prontera",155,180; end; } what is supposed to be after this? getmapxy .@map$,.@x,.@y,0; if ( getgroupid() > 3 || killedrid == getcharid(3)) and then after this? (.@map$ == "arena") { announce rid2name(killerrid)+" wins against "+strcharinfo(0)+" at pvp!",bc_all; warp "prontera",155,180; Quote
AnnieRuru Posted February 17, 2014 Posted February 17, 2014 lol you both ... - script kjdfkjsdf -1,{ OnPCDieEvent: if ( strcharinfo(3) != "arena" || getgroupid() > 3 ) end; if ( killerrid ) announce rid2name( killerrid )+" wins against "+ strcharinfo(0), bc_all; // sure .. you need to warp player out even if he suicide warp "prontera",155,180; end; } 1 Quote
Kido Posted February 17, 2014 Posted February 17, 2014 oh lol sorry still trying to figure out how some scripts work (the order) i was confused of what he wanted @_@ sorry again lol Quote
TiMz Posted February 18, 2014 Author Posted February 18, 2014 (edited) Mind explaining the output that you want? Basically the broadcast should happen only in the specific map when one player is killed and shouldn't broadcast when using @die. Edited February 18, 2014 by Isaiah Quote
sandbox Posted February 18, 2014 Posted February 18, 2014 (edited) Try this? OnPCDieEvent: if(strcharinfo(3) == "arena" && getgroupid() < 3 && killerrid != getcharid(0)) { announce rid2name(killerrid)+" wins against "+strcharinfo(0),bc_all; } end; Edited February 18, 2014 by sandbox Quote
Patskie Posted February 18, 2014 Posted February 18, 2014 Might wanna test AnnieRuru approach? Try this? OnPCDieEvent: if(strcharinfo(3) == "arena" && getgroupid() < 3 && killerrid != getcharid(0)) { announce rid2name(killerrid)+" wins against "+strcharinfo(0),bc_all; } end; killerrid is set as account id not character id ( getcharid(3) not getcharid(0) ) Quote
sandbox Posted February 19, 2014 Posted February 19, 2014 Really!? Then my whole life has been a lie 1 Quote
Kido Posted February 20, 2014 Posted February 20, 2014 huh there are more pvp npcs that do that but it's only for pvp rooms, so want the braodcast work on different maps o:? Quote
Question
TiMz
Script only reads the if and not the else part. Which part is written badly?
9 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.