DumbAss_2018.05.27_141518.png[/attachment
][attachment=3]DumbAss_2018.05.27_130821.png[/attachment
][attachment=4]DumbAss_2018.05.16_183134.png
Pirates & Fishing
Re: Pirates & Fishing
At one point I had a randomizer that would randomly pop you into the zone with pirates, and then would time out when they spawned. I lost that in the server moves.
Re: Pirates & Fishing
I use a rnd generator in transport.cpp that triggers 4 x rnd on the Selbina docking. Then if the random is at a certain level it selects the pirate in Selbina and/or Mhaura. The other 2 are for Sea Horror / Sea Monk.
Mhaura Zone
function onEventFinish(player,csid,option)
if (csid == 200) then
local DepartureTime = VanadielHour();
if (DepartureTime % 8 == 0) then
pirate1 = GetServerVariable("boat1");
printf("Pirate \n",boat1);
if (pirate1 >= 820) then
pzone = 227; -- Pirates
else
pzone=220; -- Selbina
end
player:setPos(0,0,0,0,pzone); -- Boat to Selbina or Pirates
elseif (DepartureTime % 8 == 4) then
player:setPos(0,0,0,0,46); -- Boat to Aht Urhgan
else
player:setPos(8,-1,5,62,249); -- Something went wrong, dump them on the dock for safety.
end
elseif (csid == 322) then
player:setVar("COP_shikarees_story",1);
end
end;
In transport
// set pirate spawn for selb and Mhaur Boats and Monk/Horror
uint32 setp = PTransport->PTransportNPC->animation = PTransport->AnimationDepart;
int ptd= PTransport->Dock.prevzone; // Looking for boat to Selbina
if (ptd == 220)
{
int n = 1;
while (n < 5)
{
long boat = dsprand::GetRandomNumber(1000);
auto boatname = "boat" + std::to_string(n);
const char* fmtQuery = "UPDATE server_variables SET value = %u WHERE name = '%s';"; //update the 4 vars for pirates and boat Mobs
int32 ret = Sql_Query(SqlHandle, fmtQuery, boat, boatname);
++n;
}
}
Mhaura Zone
function onEventFinish(player,csid,option)
if (csid == 200) then
local DepartureTime = VanadielHour();
if (DepartureTime % 8 == 0) then
pirate1 = GetServerVariable("boat1");
printf("Pirate \n",boat1);
if (pirate1 >= 820) then
pzone = 227; -- Pirates
else
pzone=220; -- Selbina
end
player:setPos(0,0,0,0,pzone); -- Boat to Selbina or Pirates
elseif (DepartureTime % 8 == 4) then
player:setPos(0,0,0,0,46); -- Boat to Aht Urhgan
else
player:setPos(8,-1,5,62,249); -- Something went wrong, dump them on the dock for safety.
end
elseif (csid == 322) then
player:setVar("COP_shikarees_story",1);
end
end;
In transport
// set pirate spawn for selb and Mhaur Boats and Monk/Horror
uint32 setp = PTransport->PTransportNPC->animation = PTransport->AnimationDepart;
int ptd= PTransport->Dock.prevzone; // Looking for boat to Selbina
if (ptd == 220)
{
int n = 1;
while (n < 5)
{
long boat = dsprand::GetRandomNumber(1000);
auto boatname = "boat" + std::to_string(n);
const char* fmtQuery = "UPDATE server_variables SET value = %u WHERE name = '%s';"; //update the 4 vars for pirates and boat Mobs
int32 ret = Sql_Query(SqlHandle, fmtQuery, boat, boatname);
++n;
}
}
- DanteMccloud
- Posts: 25
- Joined: Wed May 04, 2016 10:53 pm
Re: Pirates & Fishing
Hey Jono does this still work? I was thinking of playing with this as I heard Master branch doesn't have it implemented. Did you add the Mhaura Zone script to just Mhaura or is it in Selbina Zone as well? Did you have to do anything other than add those scripts lines to transport and Mhaura in order to get pirates working?
Expedition Gaming
IP Address: expeditiongaming.ddns.net
Server Forums: https://expeditiongaming.ga/forum/index.php
Discord: https://discord.gg/5kJbxCF
Facebook is https://www.facebook.com/groups/1749730585295430
I host an array of game servers from FFXI (pre Abyssea), Tera, Arma3, FFXIV, SWG (pre-CU), BDO (v491)
IP Address: expeditiongaming.ddns.net
Server Forums: https://expeditiongaming.ga/forum/index.php
Discord: https://discord.gg/5kJbxCF
Facebook is https://www.facebook.com/groups/1749730585295430
I host an array of game servers from FFXI (pre Abyssea), Tera, Arma3, FFXIV, SWG (pre-CU), BDO (v491)