Accept Rez & Accept Hero's Call

mmoaddict

Original Script Author: VGA
can you post what you did for this

can you post what you did for this? Would be good for others to see.
 

mmoaddict

Original Script Author: VGA
trigger

what did you do for the trigger..

is there an event for pendingres? I just havent seen an event or object for res and call
 

Kazman420

Active Member
You could try setting up a VG_OnIncomingText event to look for "is attempting to ressurect you with". (at least I think that's the message you receive.. I'm unable to confirm at the moment).

Unfortunately I don't think there is a specific "Rez Accept" window.. I believe it's using VGUIAcceptDecline.xml. You could also try something like;
Code:
if ${Me.ToPawn.IsDead} && ${VGUI[_generic_accept_decline].IsDrawn}
The combination of being dead and having a Accept/Decline window IsDrawn (also try IsVisible) is probably a safe bet that you have a rez pending since I know for a fact that the Death Release is a seperate xml.. (VGUIDeathReleasePopup.xml)
 

VianSK

Well-Known Member
This is what I did...

atom(script) VG_OnIncomingText(string Text, string ChannelNumber, string ChannelName)
{
call F_HandleChat "${Text}" "${ChannelNumber}"
}

function F_HandleChat(string IncTxt, int CnlNum)
{
declare X int local 1
declare Ctrlr bool local FALSE
declare Sender string local
do
{
if ${IncTxt.Find[${Controllers[${X}]}]}
{
Ctrlr:Set[TRUE]
Sender:Set[${Controllers[${X}]}]
break
}
}
while ${X:Inc}<=${Controllers.Size}
if ${IncTxt.Find[resurrect you]} && ${CnlNum} == 32
{
VG:ExecuteCmd[/rezaccept]
}
if ${CnlNum}==0 && ${IncTxt.Find[summon you]} && ${Ctrlr}
{
VG:ExecuteCmd[/callpcaccept]
}
}

1st thing I did in my script was made an array of characters allowed to interact with my bot (Controllers[5]). I then check the incoming text to see if they can play and find out who they are if they can. This allows me to do a lot of things handeling chats...

if ${IncTxt.Find[accepts the trade]} && ${CnlNum}==0
{
VG:ExecuteCmd[/tradeok]
}

Accept ropes from only people i say. Summon people who ask for it who are on the ok list etc.

detach the Atom at exit:
function atexit()
{
Event[VG_OnIncomingText]:DetachAtom[VG_OnIncomingText]
}

I have a very good script (at least works great for me) for a 2 box, rog, disc, cleric or ranger if you want any samples or to try them let me know I will send them to you.

also Kazman, I am trying to find if there is a way to click the accept button on the ${VGUI[_quest_details_offer]} any help on this would be awesome. Thanks!
 
Last edited:
Top Bottom