Pirates & Fishing

Post Reply
jono659
Posts: 50
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: 349
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA
Contact:

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

Post Reply