AngelaKiss Posted December 5, 2014 Posted December 5, 2014 I would like to request a script that check the ip before to warp to a map of event and refuse to warp if theres a ip really hope you can help me Quote
Skorm Posted December 5, 2014 Posted December 5, 2014 prontera,102,102,3 script IP_WARP 45,3,3,{ end; OnTouch: if( getcharip() == "127.0.0.1" ) warp "prontera",0,0; end; } Quote
AngelaKiss Posted December 5, 2014 Author Posted December 5, 2014 i want to add it to this script and make players unable to doble login 2 of the same ip in the map of pvp prontera.gat,156,184,5 script Advanced PvP 414,{ //Configuracion set @nombre$, "^00CCFF[Axel]^000000";//Nombre NPC set @kill$, strcharinfo(0); //Empiezo del NPC mes @nombre$; mes "HI ^0000FF"+strcharinfo(0)+"^000000."; mes "Im here to take you to PvP"; mes "¿wich room you want to go?"; next; switch(select("Killer["+getmapusers("guild_vs2")+"]:Monster["+getmapusers("guild_vs3")+"]")){ case 1: warp "guild_vs2",0,0; end; case 2: warp "guild_vs3",0,0; close; OnPCKillEvent: announce "Player "+strcharinfo(0)+" was killed by "+@kill$+".",bc_blue; } } guild_vs2 mapflag pvp guild_vs3 mapflag pvp guild_vs2 mapflag pvp_noguild guild_vs3 mapflag pvp_noguild Quote
Conflicts Posted December 6, 2014 Posted December 6, 2014 This becomes a problem when you reach the 128 entry limit for arrays. Other than that, this should work. - script dual_ip -1,{ OnPCLoadMapEvent: getmapxy(.@amap$,.@mapx,.@mapy,0); if(.@amap$!="xmas") end; query_sql("SELECT last_ip FROM `login` WHERE account_id = "+getcharid(3)+"", .@LastIP$); query_sql("SELECT account_id FROM `login` WHERE last_ip = '"+.@LastIP$+"'", .@AccountId); set .@aidtemp,getcharid(3,strcharinfo(0)); for(set .@i ,0;.@i<getarraysize(.@AccountId);set .@i,.@i+1) { if(attachrid(.@AccountId[.@i])) { getmapxy(.@qmap$,.@qmapx,.@qmapy,0); if (.@qmap$== .@amap$) set .@j,.@j+1; } detachrid; } attachrid .@aidtemp; if(.@j > 1) { dispbottom "You may not dual client on this map."; warp "prontera",156,183; } end; } //------Enable map OnPCLoadMapEvent------------------- xmas mapflag loadevent Just replace xmas with the map of your choice. Quote
AngelaKiss Posted December 17, 2014 Author Posted December 17, 2014 (edited) Thanks Conflicts it is working but now i would like to make that it checks the ip before it warps and it wont allow the dual client to go the map. That could be possible? Edited December 17, 2014 by AngelZito Quote
Question
AngelaKiss
I would like to request a script that check the ip before to warp to a map of event and refuse to warp if theres a ip
really hope you can help me
4 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.