Hi i need a Script so i just can type .pvp enter and .pvp leave ,
so i can go to the arena and back .
i know this exist just havent found it enyone got it?
Printable View
Hi i need a Script so i just can type .pvp enter and .pvp leave ,
so i can go to the arena and back .
i know this exist just havent found it enyone got it?
i know theres one around here for mangos mabye on the sdb forum not sure
there is one on the mangoscript forum
If anyone gets a hold of it, would they care to upload it please.
somone still havent found this script`?
if you now where it is pls post a link=)
*Bump
I've tested out many different cores and db's for mangos, and none of them have support for this.
If anyone has edited thier own into thier database, would they be kind enough to export an sql for us.
Half of the script has already been added to the newer revs. But it's only half done. Here's the script so far:
Now it just needs to have a leave command added...Code:function pvp_enter_cmd(player,args,type)
if not player:isInCombat() then
player:TeleportTo( 0 , -13228.1, 227.833, 32.8926 , 1.06 ,true ,true )
end
return true
end
register_lua_script_command(".enterpvp","pvp_enter_cmd")
bump
Look, something like this would be extremely easy to do. The leave command will be almost identical to the enter command, except it teleports to the remembered location (you'd have to edit the enter command for it to remember your current position). Try doing something yourselves for once...
lol, that wasn't aimed at you, ryu. I'll outline the process for everyone.
Create a new SQL table, called something like pvp_pos, or summin similiar, and make 6 columns; one for the character ID, and the other 5 to store mapID, x position, y position, z position, and orientation. Then, in the enterpvp command, make it set the position info in the new table. Then create your leavepvp command based on the original enterpvp one, and make it pull the info from the table and store them into variables, and use the variables in the TeleportTo function (not sure if you could access required columns directly in TeleportTo. If so, you wouldn't need to create variables.) VOILA! You have working pvp enter and leave commands. ^_^
Ah, thought you ment to everyone lol.
Btw, have you tested that out on mangos?
As I done something long them lines but with no joy at all.
=================
Whats happening:
Realm type: PvP
Mangosd.conf: Type 1
=================
When I type /pvp it says "pvp toggled"
But im unable to attack any players "even when they are in pvp mode too"
using the .pvp enter all it does is say "pvp toggled"
and using .pvp leave "pvp mdoe disabled after 5mins of friendly area"
Im guessing i've not done something right, and even after trying what you typed up, still nothing changes.
But im sure within time a mangos core will be released and the devscript or mangos script will contain the correct information in it.
But if you have any other idea m8, let me know.
Try typing .enterpvp instead. That's what the script is registered to.
Anyway, me and ravine are working on pvp right now, so hopefuly we will have some results;)
I'll let you know if we have any luck.
Ok, we have looked into it.
PvP don't work period...
But since BG's don't work yet, this is to be expected.
We shall just have to live with duels for now, shame as it would of been fun to fight in the arena:)
As for pvp, wowemu still has it fully working.
So for anyone that wants pvp working like it should, use wowemu.
boys =) i have played on a mangos server with this pvp script , the servers name is worldofoppertunites, so i NOW this exist. =)
And in what way does PvP work?
If it's just duels, then we already know they have worked for ages..
If .enter pvp or .pvp enter works, and they are indeed taken to where it should be, then let me know.
Because if so, then at least I know it's possible..
.pvp enter to go to the arena and .pvp leave to go back to where you used .pvp enter , thats how it is working ! and the server that has this script is a mangos server Not a wowemu
the admin of the server is the one ho has made the script, i have talked to him but he wont give me the script , he says his server is "unique" ,
Nice!
thanks for the info, at least now i know it's possible!
Someone give Lipton a chocolate cookie or somethingxD
Anyway, shame the admin is not willing to supply his script, but I 100% agree with him anyway.
If I had made my own pvp script, I would not want others to have it either, that way if they want the good stuff then they have to use your server;)
But no worries, since i know scripting it into mangos is possible, im sure something will get sorted. Myself has uhm zero knowledge of scripting, but I know people that do..
good =) i would really want this script so when its out , post it here =)
Ryu, let me know what MaNGOS pack ur using, and we'll start working on getting the scripts done. Talk to you on X-Nubs.
Guys when u make script please post it here, we need it badly.
There is that GM cmd .recal, it could be changed to .leavepvp by blocking part where u can .recal others, so it works only on yourself.
But somebody smart gota do it :D
Code:function pvp_enter_cmd(player,args,type)
if args == "enter" and not player:isInCombat() then
player:TeleportTo( 0 , -13228.1, 227.833, 32.8926 , 1.06 ,true ,true )
end
return true
end
register_lua_script_command(".pvp","pvp_enter_cmd")
Code:function pvp_enter_cmd(player,args,type)
if not player:isInCombat() then
player:TeleportTo( 0 , -13228.1, 227.833, 32.8926 , 1.06 ,true ,true )
end
return true
end
register_lua_script_command(".enterpvp","pvp_enter_cmd")
function pvp_leave_cmd(player,args,type)
if not player:isInCombat() then
player:TeleportTo( 0 , -13228.1, 227.833, 32.8926 , 1.06 ,true ,true )
end
return true
end
register_lua_script_command(".leavepvp","pvp_leave_cmd")
Dristol is that Code Working or what ?
Thats using lua scripting.
I think most of the mangos cores I use wont be able to us ethat, but nice work.
If i want to use that code, how do i do ? iam not very good at this yet
I added this code in my Masterscript.lua and i can use .enterpvp but .leavepvp dosent work , .leavepvp has the same function as .enterpvp
As a temporary fix, just change the coordinates in .leavepvp command. If you had looked at the script BEFORE you added it to your server, you would have noticed that both the .enterpvp and the .leavepvp command are identical.
yee i now, so how can we do so the .leavepvp command takes us to the same location where we first used .enterpvp?
pvp_cmd.lua
sql to create tableCode:function round(num, idp)
local mult = 10^(idp or 0)
return math.floor(num * mult + 0.5) / mult
end
function pvp_enter_cmd(player,args,type)
if not player:isInCombat() and not player:isInFlight() then
local myx = player:getPlayerX();
local myy = player:getPlayerY();
local myz = player:getPlayerZ();
local mymap = player:getPlayerMapID();
local mypvpid = tonumber(player:GetGUIDLow());
queryString = "SELECT `time_enter` FROM `pvp_cmd_data` WHERE `playerid`="..mypvpid;
local query = sDatabase:Query(queryString)
local pvptimenow = os.time();
if query ~= nil and query:GetRowCount() > 0 then
local gotpvpdata = query:Fetch()
local cooldown = gotpvpdata[0]:GetInt32()
--local mymap = gotpvpdata[1]:GetString()
if (pvptimenow - cooldown) >= 1800 then
sDatabase:Execute("DELETE FROM `pvp_cmd_data` WHERE `playerid`="..mypvpid.."");
sDatabase:Execute("INSERT INTO `pvp_cmd_data` VALUES("..pvptimenow..", "..mypvpid..", "..mymap..", "..pvptimenow..", 1, "..myx..", "..myy..", "..myz..")")
player:TeleportTo( 0 , -13228.1, 227.833, 32.8926 , 1.06 ,true ,true )
else
local pvpwaittime = ((1800 - (pvptimenow - cooldown)) / 60)
local newtime = round(pvpwaittime, 1)
player:SendSysMessage("You can not do that yet you must wait "..newtime.." minutes.")
end
else
--sDatabase:Execute("INSERT INTO `pvp_cmd_data` VALUES("..pvptimenow..", "..mypvpid..", "..mymap..","..pvptimenow..",1)")
sDatabase:Execute("INSERT INTO `pvp_cmd_data` VALUES("..pvptimenow..", "..mypvpid..", "..mymap..", "..pvptimenow..", 1, "..myx..", "..myy..", "..myz..")")
player:TeleportTo( 0 , -13228.1, 227.833, 32.8926 , 1.06 ,true ,true )
end
end
return true
end
register_lua_script_command(".pvpenter","pvp_enter_cmd")
function pvp_leave_cmd(player,args,type)
if not player:isInCombat() and not player:isInFlight() then
local mypvpid = tonumber(player:GetGUIDLow());
queryString = "SELECT `mymap` , `time_leave` , `in_arena` , `myx` , `myy` , `myz` FROM `pvp_cmd_data` WHERE `playerid`="..mypvpid;
local query = sDatabase:Query(queryString)
local pvptimenow = os.time();
if query ~= nil and query:GetRowCount() > 0 then
local gotpvpdata = query:Fetch()
local gomapid = gotpvpdata[0]:GetInt32()
local cooldown = gotpvpdata[1]:GetInt32()
local canleave = gotpvpdata[2]:GetInt32()
local gox = gotpvpdata[3]:GetInt32()
local goy = gotpvpdata[4]:GetInt32()
local goz = gotpvpdata[5]:GetInt32()
if canleave == 1 then
if (pvptimenow - cooldown) >= 60 then
--player:TeleportTo( 0 , -14406.59, 419.35, 22.39 , 1.06 ,true ,true )
player:TeleportTo( gomapid , gox , goy , goz , 1.06 ,true ,true )
sDatabase:Execute("UPDATE `pvp_cmd_data` SET `in_arena`='0' WHERE `playerid`='"..mypvpid.."'")
else
local pvpwaittime = ((60 - (pvptimenow - cooldown)) / 60)
local newtime = round(pvpwaittime, 1)
player:SendSysMessage("You only just got here, you must wait "..newtime.." minutes.")
end
else
player:SendSysMessage("You must be in the arena! Type .pvpenter")
end
end
end
return true
end
register_lua_script_command(".pvpleave","pvp_leave_cmd")
Big credit to biglad for this script!Code:CREATE TABLE `pvp_cmd_data` (
`time_enter` varchar(255) default NULL,
`playerid` int(11) default NULL,
`mymap` varchar(255) default NULL,
`time_leave` varchar(255) default NULL,
`in_arena` int(11) default NULL,
`myx` varchar(255) default NULL,
`myy` varchar(255) default NULL,
`myz` varchar(255) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='InnoDB free: 22528 kB; InnoDB free: 22528 kB; InnoDB free: 2';