Pirates & Fishing

Post Reply
jono659
Posts: 59
Joined: Sat Mar 24, 2018 1:01 pm

Pirates & Fishing

Post by jono659 » Thu Jul 05, 2018 8:32 am

Here are a few current
Enko_2018.06.02_191221.png
Enko_2018.05.28_210955.png
DumbAss_2018.05.27_141518.png[/attachment ][attachment=3]DumbAss_2018.05.27_130821.png[/attachment ][attachment=4]DumbAss_2018.05.16_183134.png
Attachments
DumbAss_2018.05.27_141518.png
DumbAss_2018.05.27_130821.png
DumbAss_2018.05.16_183134.png

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Pirates & Fishing

Post by tagban » Sun Sep 16, 2018 11:24 am

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.

jono659
Posts: 59
Joined: Sat Mar 24, 2018 1:01 pm

Re: Pirates & Fishing

Post by jono659 » Mon Sep 17, 2018 2:09 am

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;
}
}

User avatar
DanteMccloud
Posts: 25
Joined: Wed May 04, 2016 10:53 pm

Re: Pirates & Fishing

Post by DanteMccloud » Tue May 14, 2019 9:38 am

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)

Post Reply