Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripts I need Help With
Author Message
Reflex
Journeyman
*

Posts: 130
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #1
Scripts I need Help With
script #1 Bola script from default community scp pack. Ive made some changes to it but i'm not sure how to make the thrower get "attacker" flags towards the person he's throwing it at. Just kinda as if you ran up and started wrestling someone. 2nd I'm not sure how to keep it from throwing the entire amount of bolas.

Code:
//****************************************************************************
// SphereServer ©1997-2009
// This script is part from the Sphere Community Script Pack.
// You can download the full pack from: www.sphereserver.net
//****************************************************************************
// FILE LAST UPDATED:
VERSION=0.56b

//[COMMENT BOLAS]
//1040018 - You have no reason to throw a bola at that
//1040019 The bola must be in your pack to use it.
//1040020 You must wait a few moments before you can throw another bola
//1040025 You make the bola and place it in your pack.
//1040026 You do not have enough bola balls to make this.
//1040028 You fail to make the bola and ruin the leather in the process.
// 1042045 With 4 of these and 3 strips of leather a good tinker could make a working bola...
// 1042048 This bola is already being used
// 1042049 You must wait a few moments before you can use another bola!
// 1042051 Your hands must be free to use a bola!
// 1042052 Your hands must be free to use a bola!
// 1042055 You begin to swing a bola...
// 1042058 You cannot throw a bola at that.
// 1042615 You make the bola and place it in your pack.
// 1049633 ~1_NAME~ begins to menacingly swing a bola...
// 1062910 You cannot mount while recovering from a bola throw.
// 1040017 You can't throw this at yourself
//
//
//

[TYPEDEF t_bola]
ON=@DClick
if <topobj.uid> != <src.uid>
src.sysmessage <def.scp.bola_notinpack>
return 1
endif
if <src.ctag0.delay.bola> > <serv.time>
src.sysmessage <def.scp.bola_cantusenow>
return 1
endif
if <tag0.inuse>
src.sysmessage <def.scp.bola_inuse>
return 1
endif
//if <src.findlayer.1.uid> || <src.findlayer.2.uid>
//src.sysmessage <def.scp.bola_handsfree>
//return 1
//endif
if <src.flags>&statf_onhorse
src.sysmessage <def.scp.bola_youremounted>
return 1
endif
if <src.flags>&statf_polymorph
src.sysmessage <def.scp.bola_polymorphed>
return 1
endif
src.findlayer.1.unequip
src.findlayer.2.unequip
src.events +e_bola
src.message <def.scp.bola_beginfrom>
tag.inuse = 1
timerf 2,target // <src.f_combatsys_hitspeed 3.0>
forclients 18
    if (<src.uid> != <uid>)
    trysrc <uid> uid.<src.uid>.message <def.scp.bola_beginto>,<src.name>
    endif
endfor
return 1

ON=@TargOn_Char
src.events -e_Bola
tag.inuse
if <src.targ.uid> == <uid> // fix this later
src.sysmessage throwing bola at self
return 1
endif

if <topobj.uid> != <src.uid>
src.sysmessage <def.scp.bola_notinpack>
return 1
endif
//if <src.findlayer.1.uid> || <src.findlayer.2.uid>
//src.sysmessage <def.scp.bola_handsfree>
//return 1
//endif
if !(<argo.flags>&statf_onhorse)
src.sysmessage <def.scp.bola_noreason>
return 1
endif
if <src.flags>&statf_polymorph
src.sysmessage <def.scp.bola_polymorphed>
return 1
endif
local.plore = <eval (<src.archery> * (<argo.animallore> / 3.3)) / 100>
local.pdex = <eval (<src.archery> * (<argo.dex> / 2)) / 100>
local.random = <eval (<src.archery> - <local.plore> - <local.pdex>) / 10>
src.face <argo.uid>
src.anim 11
argo.effect 0,026ac,10,0,0,0,0
p = <argo.p>
if <r100> > <local.random>
src.sysmessage @,,1 Has errado a <argo.name>!
// Has errado a means You have missed, so its going to be You missed "name"
else
src.sysmessage @,,1 you succesfully threw a bola at <argo.name>
src.targ.sysmessage <src.name> has hit you with a bola and dismounted you!
//argo.damage 1 dam_god <src.uid> // this needs to be changed to give attack flag
argo.dismount
argo.events +e_BolaHit
argo.timerf 3,events -e_BolaHit
src.tag.delay.bola = <eval <serv.time> + 2.0>
argo.update
attr |= attr_decay
timer = <eval <serv.decaytimer> * 60>
update
consume 1
endif
return 1

ON=@TargOn_Ground
src.sysmessageloc -1,1042058, //means that way you will just manage to break the bolas
src.events -e_Bola
tag.inuse
return 1

ON=@TargOn_Item
src.sysmessage @,,1 Asi solo logras romper las bolas, o el otro objeto. // means that way you will just manage to break the bolas, or the other object
src.events -e_Bola
tag.inuse
return 1

ON=@TargOn_Cancel
src.events -e_Bola
tag.inuse
return 1

[EVENTS e_Bola]
ON=@ItemEquipTest
RETURN 1

ON=@ItemUnEquipTest
RETURN 1

ON=@Mount
RETURN 1

[EVENTS e_BolaHit]
ON=@Mount
RETURN 1

[eof]

//Sphere Stuck Menu//
Here I am having troubles figuring out how to add incremental timers according to how many times the stuck timer has been called in a 24 hour period and after the 24 hour period have it reset to default.

[PLEVEL 1]
help

[FUNCTION help]
DIALOG d_help_menu

[ITEMDEF i_memory_stuck_town]
ID=i_memory
name=i_memory_stuck_town
type=t_eq_script
LAYER=layer_special

on=@create
    ATTR=attr_decay
    TIMER=600

ON=@Equip
TIMER=60
SRC.NOMOVES 600
link = <src>
src.sysmessageloc -1, 1072240,  //1153 0 0 1 You will be teleported within the next few minutes.

on=@timer
If (<link.kills> >= 5 )
DORAND 3
link.go Buccaneer's Den
link.go serpent's hold
link.go papua
ENDDO
Else
DORAND 7
link.go britain
link.go minoc
link.go vesper
link.go trinsic
link.go moonglow
link.go yew
link.go delucia
ENDDO
Endif
remove
return 1

//shrine
[ITEMDEF i_memory_stuck_shrine]
ID=i_memory
name=i_memory_stuck_shrine
type=t_eq_script
LAYER=layer_special

on=@create
    ATTR=attr_decay
    TIMER=600

ON=@Equip
TIMER=60
SRC.NOMOVES 600
link = <src>
src.sysmessageloc -1,1072240, //1153 0 0 1 You will be teleported within the next few minutes.
return 1

on=@timer
DORAND 7
link.go 4215,563,41
link.go 1729,3528,3
link.go 1601,2489,9
link.go 2491,3930,0
link.go 1301,639,16
link.go 3354,299,9
link.go 4273,3702,0
ENDDO
remove
return 1

[DIALOG d_stuck_proceed]
0,0
page 0
resizepic 40 47 9200 318 203
resizepic 108 55 9200 178 24
dtext 118 55 0593 Proceed to Stuck Option
dhtmlgump 54 81 291 133 1 1 You are about to use the stuck option and will be unable to move.  This will make you vulnerable to attacks for no less than 1 minute of game time. To proceed, click Okay.
button 214 220 247 248 1 0 1
button 283 221 241 243 1 0 0
Group 0
checkbox 50 223 208 209 0 2
dtext 70 221 1153 Town
checkbox 111 223 208 209 0 3
dtext 133 221 1153 Shrine
src.ctag.stuck = 1

[DIALOG d_stuck_proceed button]
ON=0 // cancel
sysmessage @035,,2 501235
ON=1 // Okay
Local.stuckcheck = 0
FOR 2 3
If <ARGCHK[<Local._for>]>
Local.stuckcheck += 1
Endif
ENDFOR
If <Local.stuckcheck> > <Src.Ctag.stuck>
src.sysmessageua 022 0 0 1 You must choose a single destination by either choosing, "Town" or "Shrine".
return 1
Endif
If <Local.stuckcheck> < <Src.Ctag.stuck>
src.sysmessageua 022 0 0 1 Please choose your destination by selecting either, "Town" or "Shrine".
return 1
Endif
FOR 2
If <ARGCHK[<Local._for>]> // equiping stuck town memory
serv.newitem i_memory_stuck_town
new.equip
return 1
Endif
ENDFOR
FOR 3
If <ARGCHK[<Local._for>]> //equipping stuck shrine memory.
serv.newitem i_memory_stuck_shrine
new.equip
Endif
ENDFOR
return 1
// end of stuck script
//Start of entire sphere_help.scp

//****************************************************************************
// SphereServer ©1997-2009
// This script is part from the Sphere Community Script Pack.
// You can download the full pack from: www.sphereserver.net
//****************************************************************************
// FILE LAST UPDATED:
VERSION=0.56b

[PLEVEL 1]
help

[FUNCTION help]
DIALOG d_help_menu

[ITEMDEF i_memory_stuck_town]
ID=i_memory
name=i_memory_stuck_town
type=t_eq_script
LAYER=layer_special

on=@create
    ATTR=attr_decay
    TIMER=600

ON=@Equip
TIMER=60
SRC.NOMOVES 600
link = <src>
src.sysmessageloc -1, 1072240,  //1153 0 0 1 You will be teleported within the next few minutes.

on=@timer
If (<link.kills> >= 5 )
DORAND 3
link.go Buccaneer's Den
link.go serpent's hold
link.go papua
ENDDO
Else
DORAND 7
link.go britain
link.go minoc
link.go vesper
link.go trinsic
link.go moonglow
link.go yew
link.go delucia
ENDDO
Endif
remove
return 1

//shrine
[ITEMDEF i_memory_stuck_shrine]
ID=i_memory
name=i_memory_stuck_shrine
type=t_eq_script
LAYER=layer_special

on=@create
    ATTR=attr_decay
    TIMER=600

ON=@Equip
TIMER=60
SRC.NOMOVES 600
link = <src>
src.sysmessageloc -1,1072240, //1153 0 0 1 You will be teleported within the next few minutes.
return 1

on=@timer
DORAND 7
link.go 4215,563,41
link.go 1729,3528,3
link.go 1601,2489,9
link.go 2491,3930,0
link.go 1301,639,16
link.go 3354,299,9
link.go 4273,3702,0
ENDDO
remove
return 1

[DIALOG d_stuck_proceed]
0,0
page 0
resizepic 40 47 9200 318 203
resizepic 108 55 9200 178 24
dtext 118 55 0593 Proceed to Stuck Option
dhtmlgump 54 81 291 133 1 1 You are about to use the stuck option and will be unable to move.  This will make you vulnerable to attacks for no less than 1 minute of game time. To proceed, click Okay.
button 214 220 247 248 1 0 1
button 283 221 241 243 1 0 0
Group 0
checkbox 50 223 208 209 0 2
dtext 70 221 1153 Town
checkbox 111 223 208 209 0 3
dtext 133 221 1153 Shrine
src.ctag.stuck = 1

[DIALOG d_stuck_proceed button]
ON=0 // cancel
sysmessage @035,,2 501235
ON=1 // Okay
Local.stuckcheck = 0
FOR 2 3
If <ARGCHK[<Local._for>]>
Local.stuckcheck += 1
Endif
ENDFOR
If <Local.stuckcheck> > <Src.Ctag.stuck>
src.sysmessageua 022 0 0 1 You must choose a single destination by either choosing, "Town" or "Shrine".
return 1
Endif
If <Local.stuckcheck> < <Src.Ctag.stuck>
src.sysmessageua 022 0 0 1 Please choose your destination by selecting either, "Town" or "Shrine".
return 1
Endif
FOR 2
If <ARGCHK[<Local._for>]> // equiping stuck town memory
serv.newitem i_memory_stuck_town
new.equip
return 1
Endif
ENDFOR
FOR 3
If <ARGCHK[<Local._for>]> //equipping stuck shrine memory.
serv.newitem i_memory_stuck_shrine
new.equip
Endif
ENDFOR
return 1

[DIALOG d_help_menu]
50,50
resizepic 50 25 2600 700 430

page 0
xmfhtmlgump 150 50 360 40 1001002 0 0 // <CENTER><U>Ultima Online Help Menu</U></CENTER>
button 625 420 2073 2072 1 0 0 // Close
resizepic 560 90 2620 175 315
gumppic 560 125 12
gumppic 560 125 50987
dtext 575 344 80 Dont Forget to Vote! // add this later
button 575 105 1209 1210 1 0 9 // Server Status / .status
button 575 125 1209 1210 1 0 10 // Server Version / .version
button 575 145 1209 1210 1 0 11 // Commands / .commands
dtext 595 102 450 Server Version
dtext 595 122 450 Server Status
dtext 595 142 450 Commands

page 1
xmfhtmlgump 110 90 450 74 1001003 1 1    // <U>General question about Ultima Online</U>: Select this option if you are having difficulties learning to use a skill, if you have a general gameplay question, or you would like to search the UO Knowledge Base.
xmfhtmlgump 110 170 450 74 1001004 1 1    // <u>My character is physically stuck in the game.</u> This choice only covers cases where your character is physically stuck in a location they cannot move out of. This option will only work two times in 24 hours.
xmfhtmlgump 110 250 450 74 1001005 1 1    // <u>Another player is harassing me.</u> Another player is verbally harassing your character. When you select this option you will be sending a text log to Origin Systems. To see what constitutes harassment please visit http://support.uo.com/gm_9.html.
xmfhtmlgump 110 330 450 74 1001006 1 1    // <u>Other.</u> If you are experiencing a problem in the game that does not fall into one of the other categories or is not addressed on the Support web page (located at http://support.uo.com), please use this option.
button 80 90 5540 5541 1 0 1    // General
button 80 170 5540 5541 1 0 2    // Stuck
button 80 250 5540 5541 0 3 0    // Harrasing
button 80 330 5540 5541 0 2 0    // Other

page 2
xmfhtmlgump 110 90 450 74 1001009 1 1    // <U>Report a bug</U>: Use this option to launch your web browser submit a bug report.  Your report will be read by our Quality Assurance staff.  We apologize for not being able to reply to individual bug reports.
xmfhtmlgump 110 170 450 74 1001010 1 1    // <U>Contact a Counselor</U>: A Counselor is an experienced Ultima Online player who has volunteered their time to help answer general gameplay questions.  Selecting this option will let you send a message to a Counselor.  Please remember that Counselors are volunteers and may not be available at all times so please be patient and remember to check the website for additional help.;Original
xmfhtmlgump 110 250 450 74 1074795 1 1    // <U>Suggestion for the Game</U>: If you'd like to make a suggestion for the game it should be directed to the Development Team Members who participate in the discussion forums.  Choosing this option will take you to the discussion forums.
xmfhtmlgump 110 330 450 74 1001006 1 1    // <u>Other.</u> If you are experiencing a problem in the game that does not fall into one of the other categories or is not addressed on the Support web page (located at http://support.uo.com), please use this option.
button 80 90 5540 5541 1 0 3    // Bug
button 80 170 5540 5541 1 0 4    // Counselor
button 80 250 5540 5541 1 0 5    // Suggestion
button 80 330 5540 5541 1 0 6    // Other
button 150 410 5540 5541 0 1 0 // Wrong Selection
xmfhtmlgump 180 410 335 40 1001015 0 0

page 3
xmfhtmlgump 110 90 450 145 1062572 1 1    // Verbal Harassment
xmfhtmlgump 110 240 450 145 1062573 1 1    // Physical Harassment
xmfhtmlgump 180 390 335 40 1001015 0 0    // Wrong section
button 80 90 5540 5541 1 0 7    // Verbal
button 80 240 5540 5541 1 0 8    // Physical
button 150 390 5540 5541 0 1 0    // Wrong section

[DIALOG d_help_menu BUTTON]
ON=0
sysmessage @035,,2 501235
return 1

ON=1 8
doswitch <argn>
local.blank
local.reason = General
local.reason = Stuck
local.reason = Bug
local.reason = Counselor
local.reason = Suggestion
local.reason = Other
local.reason = Verbal_Harassment
local.reason = Physical_Harassment
enddo
if <src.restest i_memory_stuck_town>
src.sysmessageua 022 0 0 1 You have already chosen a stuck option
return 1

elif <src.restest i_memory_stuck_shrine>
src.sysmessageua 022 0 0 1 You have already chosen a stuck option
return 1

elif <argn> == 2 // Need to Add statement to check if they have used the stuck menu more than 3 times a day.
src.closealldialogs
src.sdialog d_stuck_proceed
return 1
else
ctag0.page.reason = <local.reason>
sdialog d_page_request
return 1
endif
endif

ON=9
version
on=10
information
on=11
commands

[DIALOG d_page_request]
0,0
resizepic 50 50 2600 540 350

page 0
xmfhtmlgump 264 80 200 24 1062524 0 0 // Enter Description
xmfhtmlgump 120 108 420 48 1062638 0 0 // Please enter a brief description (up to 200 characters) of your problem:
resizepic 100 148 3500 440 200
dtextentry 120 168 400 200 1153 1
button 175 355 2074 2075 1 0 1
button 405 355 2073 2072 1 0 0

[DIALOG d_page_request BUTTON]
ON=0
sysmessage @035,,2 501235
src.closealldialogs
src.sdialog d_help_menu
ctag.page.reason
return 1

ON=1
if <isempty <argtxt[1]>>
sysmessage @035,,1 You must enter a description.
sdialog d_page_request
else
sysmessage @035,,2 501234 // The next available Counselor/Game Master will respond as soon as possible. Please check your Journal for messages every few minutes.
PageAdd <uid> <ctag0.page.reason> <argtxt[1]>
ctag.page.reason
endif
return 1


[DIALOG d_page_queue]
30,30

page 0
gumppictiled 0 0 410 448 0a40
checkertrans 1 1 408 446
dtext 180 12 2100 Page Queue

if <LIST.pages_uid.COUNT>
page 1
    for 0 <eval (<LIST.pages_uid.COUNT> - 1)>
        if (<local._for> >= 5) && (<eval (<local._for> % 5)> == 0)
        button 368 12 0fa5 0fa7 0 <eval ((<local._for> / 5) + 1)>
        dtext 398 12 2100 Next Page
        page <eval ((<local._for> / 5) + 1)>
        button 12 12 0fae 0fb0 0 <eval (<local._for> / 5))>
        dtext 398 12 2100 Previous Page
        endif
    dhtmlgump 12 <eval (44 + ((<local._for> % 5) * 80)> 350 70 1 1 [<LIST.pages_type.<dlocal._for>>] <strsub 2 <eval strlen(<LIST.pages_text.<dlocal._for>>) - 3> <LIST.pages_text.<dlocal._for>>> <def.l1>basefont color=#<qval !(<LIST.pages_handle.<dlocal._for>>) ? 0ff0000:0ff><def.r1>[<def.l1>u<def.r1><qval !(<LIST.pages_handle.<dlocal._for>>) ? Unhandled:Handling><def.l1>/u<def.r1>]<def.l1>/basefont<def.r1>
        if !(<LIST.pages_handle.<dlocal._for>>)
        button 370 <eval ((24 + ((<local._for> % 5) * 80)) + 24)> 0fa5 0fa7 1 0 <eval (<local._for> + 1)>
        endif
    endfor
else
dtext 12 44 2100 The page queue is empty.
endif

[DIALOG d_page_queue BUTTON]
ON=1 65000
if <LIST.pages_handle.FINDELEM <uid>> == -1
LIST.pages_handle.<eval (<argn1> - 1)> = <uid>
sdialog d_page_handling
endif


[DIALOG d_page_handling]
30,30

page 0
gumppictiled 0 0 510 128 0a40
checkertrans 1 1 508 126
dtext 30 12 2100 You are handling this page:

local.handle = <LIST.pages_handle.FINDELEM <uid>>
dhtmlgump 12 44 350 70 1 1 [<LIST.pages_type.<dlocal._for>>] <strsub 2 <eval strlen(<LIST.pages_text.<dlocal.handle>>) - 3> <LIST.pages_text.<dlocal.handle>>>
button 370 44 0fa5 0fa7 1 0 1 // Go to the sender
button 370 66 0fae 0fb0 1 0 2 // Summon the sender
button 370 88 0fbd 0fbf 1 0 3 // Answer the page
button 440 44 0fb1 0fb3 1 0 4 // Delete page
button 440 66 0fb4 0fb6 1 0 5 // Stop handling the page
button 440 88 0fa2 0fa4 1 0 6 // Jail the pager

[DIALOG d_page_handling BUTTON]
ON=1
ref1 = <LIST.pages_uid.<LIST.pages_handle.FINDELEM <uid>>>
go <ref1.p>

ON=2
ref1 = <LIST.pages_uid.<LIST.pages_handle.FINDELEM <uid>>>
ref1.summonto

ON=3
sdialog d_page_answer

ON=4
PageRemove <LIST.pages_handle.FINDELEM <uid>>
sysmessage @,,1 Page has been removed.

ON=5
LIST.pages_handle.<LIST.pages_handle.FINDELEM <uid>> = 0
sysmessage @,,1 You stopped handling this page.

ON=6
if <account.plevel> < 4
LIST.pages_handle.<LIST.pages_handle.FINDELEM <uid>> = 0
src.sysmessage You can't jail people.
return 1
endif
ref1 = <LIST.pages_uid.<LIST.pages_handle.FINDELEM <uid>>>
serv.newitem i_jail_timer
new.timer 60*15 // 15 minutes seemed appropriate to me
new.tag0.reason = Paging
ref1.equip <new.uid>
ref1.sysmessage <def.scp.jail_jailed>
sysmessage @,,1 <ref1.name> has been jailed.


[DIALOG d_page_answer]
30,30

page 0
gumppictiled 0 0 410 408 0a40
checkertrans 1 1 408 406
dtext 30 12 2100 You are handling this page:
local.handle = <LIST.pages_handle.FINDELEM <uid>>
dhtmlgump 12 44 350 70 1 1 [<LIST.pages_type.<dlocal.handle>>] <strsub 2 <eval strlen(<LIST.pages_text.<dlocal.handle>>) - 3> <LIST.pages_text.<dlocal.handle>>>
resizepic 12 148 3500 350 200
dtextentry 32 168 310 200 1153 1
button 75 355 2074 2075 1 0 1
button 305 355 2073 2072 1 0 0

[DIALOG d_page_answer BUTTON]
ON=1
ref1 = <LIST.pages_uid.<LIST.pages_handle.FINDELEM <uid>>>
ref1.tag.page_response = a<argtxt[1]>
PageRemove <LIST.pages_handle.FINDELEM <uid>>
if <ref1.isonline>
trysrc <ref1> sdialog d_page_response
else
ref1.events +e_offline_page_response
endif


[DIALOG d_page_response]
30,30
noclose

page 0
resizepic 0 0 0a3c 92 75
gumppictiled 5 7 82 61 0a40
checkertrans 5 7 82 61
gumppictiled 9 11 21 53 0bbc
button 10 12 07d2 07d2 1 0 1
xmfhtmlgumpcolor 34 28 65 24 3001002 0 0 16777215

[DIALOG d_page_response BUTTON]
ON=1
sdialog d_page_response_read


[DIALOG d_page_response_read]
30,30

page 0
gumppictiled 0 0 410 128 0a40
checkertrans 1 1 408 126
dtext 30 12 2100 Answer to your page:
dhtmlgump 12 44 350 70 1 1 <strsub 1 <eval strlen(<tag0.page_response>) - 1> <tag0.page_response>>

[DIALOG d_page_response_read BUTTON]
ON=0
events -e_offline_page_response
tag.page_response =


[events e_offline_page_response]
on=@login
sdialog d_page_response


[function PageAdd]
if <LIST.pages_uid.COUNT>
    for 0 <eval (<LIST.pages_uid.COUNT> - 1)>
        if <LIST.pages_uid.<dlocal._for>> == <strarg <args>>
        LIST.pages_uid.<dlocal._for> = <strarg <args>>
        LIST.pages_type.<dlocal._for> = <strarg <streat <args>>>
        LIST.pages_text.<dlocal._for> = a<streat <streat <args>>>
        LIST.pages_time.<dlocal._for> = <serv.rticks>
        LIST.pages_pos.<dlocal._for> = <p>
        LIST.pages_handle.<dlocal._for> = 0
        serv.log @PageSys :: Page from <name> [<uid>] @ <p.x>,<p.y>,<p.z>,<p.m>: ['<strarg <streat <args>>>'] <streat <streat <args>>>
        serv.allclients NotifyGMs "Page from <name> [<uid>] @ <p.x>,<p.y>,<p.z>,<p.m>: ['<strarg <streat <args>>>'] <streat <streat <args>>>"
        return 1
        endif
    endfor
endif
LIST.pages_uid.ADD <strarg <args>>
LIST.pages_type.ADD <strarg <streat <args>>>
LIST.pages_text.ADD a<streat <streat <args>>>
LIST.pages_time.ADD <serv.rticks>
LIST.pages_pos.ADD <p>
LIST.pages_handle.ADD 0
serv.log @PageSys :: Page from <name> [<uid>] @ <p.x>,<p.y>,<p.z>,<p.m>: ['<strarg <streat <args>>>'] <streat <streat <args>>>
serv.allclients NotifyGMs "Page from <name> [<uid>] @ <p.x>,<p.y>,<p.z>,<p.m>: ['<strarg <streat <args>>>'] <streat <streat <args>>>"

[function PageRemove]
LIST.pages_uid.<argn1>.REMOVE
LIST.pages_type.<argn1>.REMOVE
LIST.pages_text.<argn1>.REMOVE
LIST.pages_time.<argn1>.REMOVE
LIST.pages_pos.<argn1>.REMOVE
LIST.pages_handle.<argn1>.REMOVE

[function PageHandle]
if <LIST.pages_handle.FINDELEM <uid>> != -1
sdialog d_page_handling
return 1
endif
sdialog d_page_queue

[function PageClear]
LIST.pages_uid.CLEAR
LIST.pages_type.CLEAR
LIST.pages_text.CLEAR
LIST.pages_time.CLEAR
LIST.pages_pos.CLEAR
LIST.pages_handle.CLEAR

[function NotifyGMs]
if <account.plevel> > 1
sysmessage @035,,1 <args>
endif

[eof]
//ankh script for t_overrride_shrine and npcs calling the dialog as well

//NPC Script
[CHARDEF c_h_healer]
// shopkeep
DEFNAME=C_H_HEALER
NAME=#NAMES_HUMANMALE the Healer
ID=C_MAN
CAN=MT_EQUIP|MT_USEHANDS|MT_WALK|MT_MALE
DESIRES=i_gold,e_notoriety,i_reag_GARLIC,i_reag_GINSENG,i_cloth
AVERSIONS=t_TRAP

TSPEECH=spk_human_prime
TSPEECH=spk_shopkeep
TSPEECH=jobHealer
TSPEECH=spk_rehello
TSPEECH=spk_needs
TSPEECH=spk_human_default
TEVENTS=e_Human_HearUnk
TEVENTS=e_Human_Needs
TEVENTS=e_Human_ConvInit
TEVENTS=e_Human_Greet
TEVENTS=e_Human_Space
TEVENTS=e_Human_Refuse
TEVENTS=e_Human_Environ

CATEGORY=Civilized
SUBSECTION=Tradesmen
DESCRIPTION=Healer (male)

ON=@Create
    NPC=brain_healer
    COLOR=colors_skin

    STR={71 85}
    DEX={81 95}
    INT={86 100}

    ANATOMY={55.0 78.0}
    FORENSICS={35.0 58.0}
    HEALING={55.0 78.0}
    SPIRITSPEAK={55.0 78.0}
    WRESTLING={15.0 38.0}
    TACTICS={15.0 35.0}

    ITEMNEWBIE=random_male_hair
    COLOR=colors_hair
    ITEMNEWBIE=random_facial_hair
    COLOR=match_hair

ON=@NPCRestock
    ITEM=RANDOM_LIGHT
    ITEM=i_robe
    COLOR=colors_yellow
    ITEM=i_sandals
    ITEM=random_coin_purse
    SELL=VENDOR_S_HEALER_SHOP
    BUY=VENDOR_B_HEALER_SHOP
//END OF NPC SCript

//START OF RES ANKH
[ITEMDEF i_ankh_beta]
name=res ankh beta
type=t_shrine

CATEGORY=Decoration - Miscellaneous
SUBSECTION=Statues
DESCRIPTION=Ankh beta

//END OF RES ANKH

//start of sphere_override_Shrine.scp This is the Type you would set the ankh to instead of scripting it directly into the ankh

[TYPEDEF T_SHRINE]
ON=@DCLICK
IF (<SRC.FLAGS>&statf_dead)
    IF <SRC.FINDID.i_resu_timer>
    SRC.SYSMESSAGE <SRC.FINDID.i_resu_timer.TIMER> secs to resurrect
    RETURN 1
    ENDIF
SRC.MOVE 1
    if <def.scp.ResurrectionDelay> > 0
    serv.newitem i_resu_timer,1,<SRC.UID>,1
    endif
src.sdialog d_RESURRECT_CONFIRM
ELSE
SRC.SYSMESSAGE You are not dead.
ENDIF
RETURN 1

ON=@ContextMenuRequest
SRC.AddContextEntry 300,6198

ON=@ContextMenuSelect
IF (<ARGN> == 300)
DIALOG D_TITHING
ENDIF

[DIALOG D_TITHING]
160,40
src.closealldialogs

PAGE 0
gumppic 30 30 102
xmfhtmlgump 95 100 120 100 1060198 0 0 //May your wealth bring blessings to those in need, if tithed upon this most sacred site.
local.gold = <src.rescount i_gold>
if <src.ctag0.offer> > <local.gold>
src.ctag0.offer = <local.gold>
elif <src.ctag0.offer> < 0
src.ctag0.offer = 0
endif
dtext 57 274 0 Gold:
dtext 87 274 53 <EVAL <LOCAL.GOLD>-<SRC.CTAG0.OFFER>>
dtext 137 274 0 Tithe:
dtext 172 274 53 <SRC.dCTAG0.OFFER>
button 105 230 5220 5220 1 0 1
button 113 230 5222 5222 1 0 1
dtext 108 228 0 <
dtext 112 228 0 <
button 127 230 5223 5223 1 0 2
dtext 131 228 0 <
button 147 230 5224 5224 1 0 3
dtext 153 228 0 >
button 168 230 5220 5220 1 0 4
button 176 230 5222 5222 1 0 4
dtext 172 228 0 >
dtext 176 228 0 >
button 217 272 4023 4024 1 0 5

[DIALOG D_TITHING BUTTON]
ON=0
// You have decided to tithe no gold to the shrine.
SRC.MESSAGE @,,2 1060193
SRC.CTAG.OFFER=

ON=1 4
DOSWITCH <EVAL <ARGN1>-1>
SRC.CTAG.OFFER=0
SRC.CTAG0.OFFER -= 100
SRC.CTAG0.OFFER += 100
SRC.CTAG.OFFER=<SRC.RESCOUNT i_gold>
ENDDO
DIALOG D_TITHING

ON=5
LOCAL.OFFER=<SRC.CTAG0.OFFER>
IF (<LOCAL.OFFER> > <SRC.RESCOUNT i_gold>)
LOCAL.OFFER=<SRC.RESCOUNT i_gold>
ELIF (<LOCAL.OFFER> < 0)
LOCAL.OFFER=0
ENDIF
IF (<EVAL <SRC.TITHING>+<LOCAL.OFFER>> > 30000)
LOCAL.OFFER=<EVAL 30000-<SRC.TITHING>>
ENDIF
IF (<LOCAL.OFFER> <= 0)
SRC.MESSAGE @,,2 1060193
SRC.CTAG.OFFER=
RETURN 1
ENDIF
REF1=<SRC.FINDLAYER.layer_pack>
IF (<REF1>) && (<SRC.RESCOUNT i_gold> >= <LOCAL.OFFER>)
SRC.CONSUME <LOCAL.OFFER> i_gold
SRC.TITHING += <LOCAL.OFFER>
SRC.MESSAGE @,,2 1060195 //You tithe gold to the shrine as a sign of devotion.
SRC.SOUND=0243
SRC.SOUND=02E6
ELSE
SRC.MESSAGE @,,2 1060194 //You do not have enough gold to tithe that amount!
ENDIF
SRC.CTAG.OFFER=

[ITEMDEF i_resu_timer]
ID=i_memory
TYPE=t_eq_script

ON=@EQUIP
TIMER = <def.scp.ResurrectionDelay>

ON=@TIMER
REMOVE
RETURN 1

//End of Ankh Type

[DIALOG d_RESURRECT_CONFIRM]
280,190
SRC.CLOSEALLDIALOGS
PAGE 0
gumppictiled 65 33 320 44 201
gumppic 22 33 206
gumppic 380 33 207
gumppictiled 22 77 44 280 202
gumppictiled 380 77 44 280 203
gumppictiled 65 355 320 44 233
gumppic 380 355 205
gumppic 22 355 204
gumppictiled 66 77 320 300 200

xmfhtmlgump 180 60 70 25 1015222 0 0


IF (<UID.<CTAG0.RESSER>.NPC> == brain_healer)
xmfhtmlgump 75 100 290 150 1011025 1 1
ELSE
xmfhtmlgump 75 100 290 150 1011026 1 1
ENDIF

button 90 285 4005 4006 1 0 1
xmfhtmlgump 125 288 70 25 1011011 0 0

button 230 285 4005 4006 1 0 0
xmfhtmlgump 265 288 70 25 1011012 0 0

[DIALOG d_RESURRECT_CONFIRM BUTTON]
ON=1
IF (!(<CANSEELOS <CTAG0.RESSER>>))
MESSAGE @,,2 502390
ELIF (<UID.<CTAG0.RESSER>.FLAGS>&statf_dead)
MESSAGE @,,2 501040
ELSE
REF1=<REGION.UID>
    IF (<REF1.BASEID> == i_champion_spawn)
    LOCAL.OLDP=<P>
    P=1,1
    SPELLEFFECT s_resurrection,1000,<CTAG0.RESSER>
    P=<LOCAL.OLDP>
    UPDATEX
    ELSE
    SPELLEFFECT s_resurrection,1000,<CTAG0.RESSER>
    ENDIF
ENDIF
CTAG.RESSER

ON=0
TRYSRC <CTAG0.RESSER> SRC.MESSAGE @,,2 503256
CTAG.RESSER

[EOF]
(This post was last modified: 04-28-2012 04:18 AM by Reflex.)
04-28-2012 04:13 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #2
RE: Scripts I need Help With
OK, first comment:

Quote://argo.damage 1 dam_god <src.uid> // this needs to be changed to give attack flag

That code *should* put an attack flag on SRC... because it was god damage (meaning it definitely hurts ARGO) and the source of the damage is specified as <SRC> (maybe change <src.uid> to just <src> and maybe change dam_god to <DEF.dam_god> and see if that fixes it?)

then, a little bit further down you see:

Quote:consume 1

That *should* consume one bola from the pile in the thrower's pack...

Lastly, I see nothing in that bola code that would leave a bola at the feet of the target... very odd if that is happening. Maybe there are other related events doing that?
(This post was last modified: 04-28-2012 05:37 AM by RanXerox.)
04-28-2012 05:30 AM
Find all posts by this user Like Post Quote this message in a reply
Reflex
Journeyman
*

Posts: 130
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #3
RE: Scripts I need Help With
Yea I added the consume 1 however it still throws the entire stack at the target so for example I have 55 bolas in my backpack it will throw 55 bolas and they will go at his feet but minus 1 so you will see 54 bolas under his feet.

As far as the damage goes I dont want to actually hurt the target by throwing a bola at him only give him the flags.
(This post was last modified: 04-28-2012 05:37 AM by Reflex.)
04-28-2012 05:37 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #4
RE: Scripts I need Help With
In that case you manually add a memory item of the "fighting" type with appropriate links to the thrower... much more complicated. It's only one damage ;-)
OK, here is the thing that puts the entire pile at the target's feet:

Quote:p = <argo.p>

Instead of that, try this:

Code:
SERV.NEWITEM i_bola
NEW.P=<ARGO.P>
NEW.TIMER=300
(This post was last modified: 04-28-2012 05:51 AM by RanXerox.)
04-28-2012 05:48 AM
Find all posts by this user Like Post Quote this message in a reply
Reflex
Journeyman
*

Posts: 130
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Apr 2012
Reputation: 1



Post: #5
RE: Scripts I need Help With
Yea, and part of the problem is default guards are broken or at least not working properly.
Thanks Yea.. I didnt see that hmm=\ I just completely removed that entire line because I dont want any bolas going to their feet a single bola should be removed from your pack that's it. so were good on that front I just changed argo.damage to argo.damage 0 dam_god <src.uid> so that way it gives the attacking flag. However, the guards are broke so that's what was wrong ;p
(This post was last modified: 04-28-2012 06:01 AM by Reflex.)
04-28-2012 05:51 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)