Soulless
Super Moderator
Posts: 335
Likes Given: 29
Likes Received: 49 in 27 posts
Joined: Jun 2012
Reputation: 12
Ye Olde Sphere
|
RE: fishing sos treasure system
This was originally Alumrial (mispelled ) but i modified it a bit for no reason at all. i know someone had this system uploaded on script sharing, so if you want the original i would suggest finding that script pack and hunting for this one. this is just the SOS message part here.
Code:
[itemdef i_sos_message]
name=waterstained SOS
id=014ed
type=t_script
on=@create
color=060
attr=attr_decay
timer=0
on=@dclick
if !(<topobj.uid>==<src.uid>)
src.sysmessage You can't use this where it is.
return 1
endif
if !(<tag0.coords>)
serv.newitem=i_sos_tile
dorand 7
new.p=<eval {2078 3400}>,<eval {1450 1900}>
new.p=<eval {2256 3175}>,<eval {2464 3350}>
new.p=<eval {50 700}>,<eval {2350 3150}>
new.p=<eval {3850 4200}>,<eval {750 2175}>
new.p=<eval {524 1050}>,<eval {3650 4000}>
new.p=<eval {1550 2050}>,<eval {3650 4000}>
new.p=<eval {3550 3800}>,<eval {50 1000}>
enddo
new.attr=attr_static|attr_move_never
new.update
tag0.coords=<new.sextantp>
endif
dialog d_sos_message
return 1
[itemdef i_sos_tile]
ID=i_water
type=t_script
on=@create
attr=attr_move_never|attr_invis
[dialog d_sos_message]
0, 0
PAGE 0
resizepic 63 62 2520 317 319
dhtmlgump 91 103 256 189 0 0 This is a message hastily scribbled by a passenger aboard a sinking ship. While it is probably too late to save the passengers and crew, perhaps some treasure went down with the ship! The message gives the ships last known sextant coordinates.
button 91 317 4014 4015 1 0 0
dtext 132 317 0 OKAY
dtext 91 293 0 <tag0.coords>
[typedef t_fish_pole]
on=@targon_ground
serv.newitem i_memory
new.p=<src.targp>
if (<new.sos_treasure_chest>)
src.sos_treasure_fishing <new.sos_treasure_chest>
return 1
endif
new.remove
on=@targon_item
if (<src.targ.baseid>==i_sos_tile)
src.sos_treasure_fishing <src.targ.uid>
return 1
endif
[function sos_treasure_chest]
foritems 3
if (<baseid>==i_sos_tile)
local.sos_treasure_chest=<uid>
endif
endfor
if (<local.sos_treasure_chest>)
return <local.sos_treasure_chest>
else
return 0
endif
[function sos_treasure_fishing]
ref1=<argn>
anim 12
sound 027
local.chance=(rand(<fishing>)
if <eval (<fishing>/10)>><local.chance>
serv.newitem i_chest_wooden_brass
new.color=060
new.p=<p>
new.update
new.load_sos_loot 3
ref1.link.tag0.treasure_found=1
ref1.remove
sysmessage @0482 You pull out a flooded tresure chest!
return 1
elseif <local.chance><<eval (<fishing>/5)>
sysmessage @0482 You disturb a sea dwelling monster!
serv.newnpc=c_sea_serpent
new.p=<ref1.p>
new.update
new.attack
return 1
else
sysmessage @0482 You fish for a while, but fail to find the treasure.
return 1
endif
[function load_sos_loot]
for <args>
serv.newitem i_gold
new.amount=<eval {1 25000}>
new.cont=<uid>
serv.newitem i_random_set_armor
new.cont=<uid>
serv.newitem i_random_rare_armor
new.cont=<uid>
serv.newitem i_random_rare_weapon
new.cont=<uid>
serv.newitem i_random_rare_jewelry
new.cont=<uid>
serv.newitem i_random_rare_clothing
new.cont=<uid>
serv.newitem random_jewel,{1 10}
new.cont=<uid>
serv.newitem random_jewel,{1 10}
new.cont=<uid>
serv.newitem random_jewel,{1 10}
new.cont=<uid>
serv.newitem random_jewel,{1 10}
new.cont=<uid>
serv.newitem pillows
new.cont=<uid>
serv.newitem paintings
new.cont=<uid>
serv.newitem bodyparts
new.cont=<uid>
serv.newitem Shipwreck_Stuff
new.cont=<uid>
endfor
What am I working on? I'll tell you what I'm working on
(This post was last modified: 08-13-2013 04:47 AM by Soulless.)
|
|
08-13-2013 04:40 AM |
|
The following 1 user Likes Soulless's post:1 user Likes Soulless's post
jexnico (11-16-2019)
|