Damon Posted December 8, 2011 Share Posted December 8, 2011 Hi, just asking if someone have a script for WoE. Like : "You have killed by ABC" , "You kill XYZ". thanks for helping me ! Quote Link to comment Share on other sites More sharing options...
Kenpachi Posted December 8, 2011 Share Posted December 8, 2011 Nobody said something about mapannounce. My idea: - script WoEKillMessage -1,{ OnPCKillEvent: if((AgitCheck() && CallSub("IsWoE1Map", StrCharInfo(3))) || (AgitCheck2() && CallSub("IsWoE2Map", StrCharInfo(3)))) { DispBottom("You killed " + RID2Name(killedrid) + "."); if(AttachRID(killedrid)) DispBottom("You were killed by " + RID2Name(killerrid) + "."); } End(); IsWoE1Map: for(Set([email protected], GetArraySize(.WoE1Maps$) - 1); [email protected] >= 0; Set([email protected], [email protected] - 1)) if(.WoE1Maps$[[email protected]] == GetArg(0)) return 1; return 0; IsWoE2Map: for(Set([email protected], GetArraySize(.WoE2Maps$) - 1); [email protected] >= 0; Set([email protected], [email protected] - 1)) if(.WoE2Maps$[[email protected]] == GetArg(0)) return 1; return 0; OnInit: SetArray(.WoE1Maps$[0], "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05" , "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05" , "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05" , "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05"); SetArray(.WoE2Maps$[0], "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05" , "schg_cas01", "schg_cas02", "schg_cas03", "schg_cas04", "schg_cas05"); End(); } @Z3RO: Why GetMapXY() instead of StrCharInfo(3)? oO Quote Link to comment Share on other sites More sharing options...
1 Emistry Posted December 9, 2011 Share Posted December 9, 2011 erm...since there is alot map to write into the array.... just wondering about this~ if we use getmapflag to check for gvg map...could that be a little bit better ? xD something like this ? - script Sample -1,{ OnPCKillEvent: if( getmapflag( strcharinfo(3),mf_gvg ) ){ announce strcharinfo(0)+" has killed "+rid2name(killedrid),0; } end; } Quote Link to comment Share on other sites More sharing options...
jTynne Posted December 8, 2011 Share Posted December 8, 2011 This should be sufficient, - script woekiller -1,{ OnPCKillEvent: getmapxy ([email protected]$, [email protected], [email protected], 0); if( [email protected]$ == "prontera") { set [email protected]$,strcharinfo(0); set [email protected]$,rid2name(killedrid); mapannounce "prontera",""[email protected]$+" has killed "[email protected]$+".",1,0xD6A4E6; end; } Change Prontera to the map(s) you want to use it on. Quote Link to comment Share on other sites More sharing options...
Z3R0 Posted December 8, 2011 Share Posted December 8, 2011 // Modified to use an array index of maps (multiple maps) - script woekiller -1,{ OnPCKillEvent: getmapxy ([email protected]$, [email protected], [email protected], 0); set [email protected]_maps$[0],"prontera","geffen"; for (set [email protected], 0; [email protected] < getarraysize([email protected]_maps$); set [email protected], [email protected] + 1) { if( [email protected]$ == [email protected]_maps$[[email protected]]) { mapannounce [email protected]_maps$[[email protected]],""+strcharinfo(0)+" has killed "+ rid2name(killedrid) +".",1,0xD6A4E6; end; } } } Quote Link to comment Share on other sites More sharing options...
Z3R0 Posted December 8, 2011 Share Posted December 8, 2011 I was only revising what was already given, but very nice kenpachi Quote Link to comment Share on other sites More sharing options...
jTynne Posted December 8, 2011 Share Posted December 8, 2011 Nobody said something about mapannounce. My idea: - script WoEKillMessage -1,{ OnPCKillEvent: if((AgitCheck() && CallSub("IsWoE1Map", StrCharInfo(3))) || (AgitCheck2() && CallSub("IsWoE2Map", StrCharInfo(3)))) { DispBottom("You killed " + RID2Name(killedrid) + "."); if(AttachRID(killedrid)) DispBottom("You were killed by " + RID2Name(killerrid) + "."); } End(); IsWoE1Map: for(Set([email protected], GetArraySize(.WoE1Maps$) - 1); [email protected] >= 0; Set([email protected], [email protected] - 1)) if(.WoE1Maps$[[email protected]] == GetArg(0)) return 1; return 0; IsWoE2Map: for(Set([email protected], GetArraySize(.WoE2Maps$) - 1); [email protected] >= 0; Set([email protected], [email protected] - 1)) if(.WoE2Maps$[[email protected]] == GetArg(0)) return 1; return 0; OnInit: SetArray(.WoE1Maps$[0], "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05" , "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05" , "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05" , "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05"); SetArray(.WoE2Maps$[0], "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05" , "schg_cas01", "schg_cas02", "schg_cas03", "schg_cas04", "schg_cas05"); End(); } @Z3RO: Why GetMapXY() instead of StrCharInfo(3)? oO Over achiever! Q,Q Teasing <3 Thank you XD I was too lazy to post the dispbottom version I have from another script since I had to use the restroom really bad >.< -saves yours and learns from it- <33 Quote Link to comment Share on other sites More sharing options...
Damon Posted December 8, 2011 Author Share Posted December 8, 2011 (edited) Nobody said something about mapannounce. My idea: - script WoEKillMessage -1,{ OnPCKillEvent: if((AgitCheck() && CallSub("IsWoE1Map", StrCharInfo(3))) || (AgitCheck2() && CallSub("IsWoE2Map", StrCharInfo(3)))) { DispBottom("You killed " + RID2Name(killedrid) + "."); if(AttachRID(killedrid)) DispBottom("You were killed by " + RID2Name(killerrid) + "."); } End(); IsWoE1Map: for(Set([email protected], GetArraySize(.WoE1Maps$) - 1); [email protected] >= 0; Set([email protected], [email protected] - 1)) if(.WoE1Maps$[[email protected]] == GetArg(0)) return 1; return 0; IsWoE2Map: for(Set([email protected], GetArraySize(.WoE2Maps$) - 1); [email protected] >= 0; Set([email protected], [email protected] - 1)) if(.WoE2Maps$[[email protected]] == GetArg(0)) return 1; return 0; OnInit: SetArray(.WoE1Maps$[0], "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05" , "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05" , "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05" , "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05"); SetArray(.WoE2Maps$[0], "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05" , "schg_cas01", "schg_cas02", "schg_cas03", "schg_cas04", "schg_cas05"); End(); } Thx ! (and thx everyone) But i have an error >.< http://imageshack.us...95/errorqy.png/ Edited December 8, 2011 by Damon Quote Link to comment Share on other sites More sharing options...
Kenpachi Posted December 8, 2011 Share Posted December 8, 2011 Aaaah, sorry. Replace: if((AgitCheck() && CallSub("IsWoE1Map", StrCharInfo(3))) || (AgitCheck2() && CallSub("IsWoE2Map", StrCharInfo(3)))) With: if((AgitCheck() && CallSub(IsWoE1Map, StrCharInfo(3))) || (AgitCheck2() && CallSub(IsWoE2Map, StrCharInfo(3)))) Quote Link to comment Share on other sites More sharing options...
Damon Posted December 8, 2011 Author Share Posted December 8, 2011 Yeah, nice ! Thx a lot <3 Awesome Quote Link to comment Share on other sites More sharing options...
Diconfrost VaNz Posted December 9, 2011 Share Posted December 9, 2011 @Kenpachi = so this is the right one? - script WoEKillMessage -1,{ OnPCKillEvent: if((AgitCheck() && CallSub(IsWoE1Map, StrCharInfo(3))) || (AgitCheck2() && CallSub(IsWoE2Map, StrCharInfo(3)))) { DispBottom("You killed " + RID2Name(killedrid) + "."); if(AttachRID(killedrid)) DispBottom("You were killed by " + RID2Name(killerrid) + "."); } End(); IsWoE1Map: for(Set([email protected], GetArraySize(.WoE1Maps$) - 1); [email protected] >= 0; Set([email protected], [email protected] - 1)) if(.WoE1Maps$[[email protected]] == GetArg(0)) return 1; return 0; IsWoE2Map: for(Set([email protected], GetArraySize(.WoE2Maps$) - 1); [email protected] >= 0; Set([email protected], [email protected] - 1)) if(.WoE2Maps$[[email protected]] == GetArg(0)) return 1; return 0; OnInit: SetArray(.WoE1Maps$[0], "aldeg_cas01", "aldeg_cas02", "aldeg_cas03", "aldeg_cas04", "aldeg_cas05" , "gefg_cas01", "gefg_cas02", "gefg_cas03", "gefg_cas04", "gefg_cas05" , "payg_cas01", "payg_cas02", "payg_cas03", "payg_cas04", "payg_cas05" , "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05"); SetArray(.WoE2Maps$[0], "arug_cas01", "arug_cas02", "arug_cas03", "arug_cas04", "arug_cas05" , "schg_cas01", "schg_cas02", "schg_cas03", "schg_cas04", "schg_cas05"); End(); } @Emistry = is that one 100% Working also? Quote Link to comment Share on other sites More sharing options...
Emistry Posted December 9, 2011 Share Posted December 9, 2011 (edited) use this 1...better. than the previous 1 i have posted.. - script Sample -1,{ OnPCKillEvent: if( getmapflag( strcharinfo(3),mf_gvg_castle ) ){ announce strcharinfo(0)+" has killed "+rid2name(killedrid),0; } end; } Tested and work in my Test Server.. this it work when the person is killed within Guild Caste Map... Only Guild Castle Map...not GVG Map ( I guess..it stil okay for you right ? using announce to show who killed you ) Otherwise....just change the Announce part to this if(AttachRID(killedrid)) DispBottom("You were killed by " + RID2Name(killerrid) + "."); Edited December 9, 2011 by Emistry Quote Link to comment Share on other sites More sharing options...
Kenpachi Posted December 10, 2011 Share Posted December 10, 2011 use this 1...better. than the previous 1 i have posted.. - script Sample -1,{ OnPCKillEvent: if( getmapflag( strcharinfo(3),mf_gvg_castle ) ){ announce strcharinfo(0)+" has killed "+rid2name(killedrid),0; } end; } Tested and work in my Test Server.. this it work when the person is killed within Guild Caste Map... Only Guild Castle Map...not GVG Map But remeber that this solution will only work on non-PK servers. On a PK server you can be killed in a castle even when WoE isn't active and this forces you to check which WoE is acive and that the current map is an according castle. Quote Link to comment Share on other sites More sharing options...
Emistry Posted December 10, 2011 Share Posted December 10, 2011 Aw..now i realize...>.< thank for that Kenpachi ~ it is true that it unable to check which type of WOE is running for these castle map..>.< Quote Link to comment Share on other sites More sharing options...
Hi,
just asking if someone have a script for WoE.
Like : "You have killed by ABC" , "You kill XYZ".
Link to comment
Share on other sites