Author Topic: Trigedit Help Requested  (Read 10268 times)

0 Members and 1 Guest are viewing this topic.

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 728
    • View Profile
    • Email
Trigedit Help Requested
« on: May 07, 2008, 07:09:24 pm »
Ok, I've got the following script and don't know if it's working.  Either it is and I can't figure out how to make the script to check the subskill or it isn't setting the subskill.  Would appreciate help.  (yes, I know this isn't the full script.  The if's before this elseif are other speech's.)  Or, I suppose another option could be that the skill I'm trying to set isn't actually set up as a skill.


Code: [Select]
Script 1 (this should set the subskill of dragonmastery)
Name: 'Ask Viden',  VNum: [ 4496], RNum: [ 1075]
Trigger Intended Assignment: Mobiles
Trigger Type: Speech, Numeric Arg: 100, Arg list: *
Commands:
<edited for content>

elseif %speech.contains(<edited so players don't know the phrase>)%
  %send% %actor% Viden looks at you and smirks.  'So, you want to be a Dragon Master, do you?' he asks.
  wait 5 s
  %send% %actor% Viden sizes you up from head to toe.
  %echoaround% %actor% Viden sizes %actor.name% up from head to toe.
  wait 2 s
  %send% %actor% Viden asks you, 'Are you sure you have what it takes?'
  wait 5 s
  %send% %actor% 'There are 7 dragons in the world that need help,' Viden tells you.
  wait 3s
  %send% %actor% 'You must find these dragons and help them,' he continues.
  %send% %actor% 'In return, they will teach you the skills you need to become a Dragon Master.'
  nop %actor.subincrease(dragonmastery)%
  wait 10s
  %send% %actor% 'If you ever forget where you are in your lessons, please come and see me.'
  smile %actor%
end

Script 2 (this is trying to check to make sure the subskill has been set)

Code: [Select]
Name: 'Dragon Master Enter',  VNum: [ 4451], RNum: [ 1067]
Trigger Intended Assignment: Mobiles
Trigger Type: Entry, Numeric Arg: 100, Arg list: None
Commands:
if %actor.sub(dragonmastery)%
  say Welcome, Dragon Master Trainee.
else
  say what can I do for you?
end
« Last Edit: May 07, 2008, 11:07:41 pm by Mordecai »

Offline Mordecai

  • Administrator
  • Full Member
  • *****
  • Posts: 107
  • Has delusions of adequacy
    • View Profile
    • Multiplayer Online Game Anyone?
    • Email
Re: Trigedit Help Requested
« Reply #1 on: May 07, 2008, 11:07:05 pm »
Ok, I've got the following script and don't know if it's working.  Either it is and I can't figure out how to make the script to check the subskill or it isn't setting the subskill.  Would appreciate help.  (yes, I know this isn't the full script.  The if's before this elseif are other speech's.)  Or, I suppose another option could be that the skill I'm trying to set isn't actually set up as a skill.


Script 1 (this should set the subskill of dragonmastery)
Name: 'Ask Viden',  VNum: [ 4496], RNum: [ 1075]
Trigger Intended Assignment: Mobiles
Trigger Type: Speech, Numeric Arg: 100, Arg list: *
Commands:
<edited for content>

elseif %speech.contains(<edited so players don't know the phrase>)%
  %send% %actor% Viden looks at you and smirks.  'So, you want to be a Dragon Master, do you?' he asks.
  wait 5 s
  %send% %actor% Viden sizes you up from head to toe.
  %echoaround% %actor% Viden sizes %actor.name% up from head to toe.
  wait 2 s
  %send% %actor% Viden asks you, 'Are you sure you have what it takes?'
  wait 5 s
  %send% %actor% 'There are 7 dragons in the world that need help,' Viden tells you.
  wait 3s
  %send% %actor% 'You must find these dragons and help them,' he continues.
  %send% %actor% 'In return, they will teach you the skills you need to become a Dragon Master.'
  nop %actor.subincrease(dragonmastery)%
  wait 10s
  %send% %actor% 'If you ever forget where you are in your lessons, please come and see me.'
  smile %actor%
end

Script 2 (this is trying to check to make sure the subskill has been set)

Name: 'Dragon Master Enter',  VNum: [ 4451], RNum: [ 1067]
Trigger Intended Assignment: Mobiles
Trigger Type: Entry, Numeric Arg: 100, Arg list: None
Commands:
if %actor.sub(dragonmastery)%
  say Welcome, Dragon Master Trainee.
else
  say what can I do for you?
end

It looks fine.
I mean, super abusable but fine.

So if someone says the 'phrase hidden for mortals don't see it' 100 times, you realise every time it will do the:
Code: [Select]
nop %actor.subincrease(DragonMastery)%And put them at 100% of Dragonmastery.

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 728
    • View Profile
    • Email
Re: Trigedit Help Requested
« Reply #2 on: May 08, 2008, 06:47:26 am »
The second script currently is just checking to make sure its actually putting the subskill on the player.  Once I know it's working, I'm going to make sure that they don't already have dragonmastery when they say the phrase.  Just right now the second script isn't doing anything, which I'm taking as the first script isn't putting the subskill on.  So, if my phrasing and scripting is right... why not?  Are the subskills there to be put on players?


Offline Diandra

  • Administrator
  • Full Member
  • *****
  • Posts: 143
    • View Profile
    • Email
Re: Trigedit Help Requested
« Reply #3 on: May 08, 2008, 10:46:22 am »
Instead of:

if %actor.sub(dragonmastery)%

try this:

if %actor.subskill(dragonmastery)%

Maybe that will do the trick.

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 728
    • View Profile
    • Email
Re: Trigedit Help Requested
« Reply #4 on: May 08, 2008, 11:46:29 am »
Everyone keeps saying that, so I'll write my answer here. 

I tried that first.  the actor.sub thingy was the second thing Mord had suggested that night.  Though, the way my luck runs, I'll probably change it back and it'll work.  *mutters as she begins looking for the script Mord's put in so she can't do scripts right the first time*

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 728
    • View Profile
    • Email
Re: Trigedit Help Requested
« Reply #5 on: May 08, 2008, 01:38:47 pm »
Well, oddness.. if I do the script Fizzy did on 4D game port then it works.  which means my error must be in... something else...

Off to visit Oasisolc to figure out what that else could be.  *ponders*

<after visiting Oasis...>

*doh*  Yep, was me.  Wanted a greet script not an enter script.  NOW I can continue.  :)
« Last Edit: May 08, 2008, 01:46:41 pm by Kvetch »

Offline Fizban

  • Maniacal Scroder!
  • Administrator
  • Full Member
  • *****
  • Posts: 183
  • Fizban, the Mangy Wizard
    • MSN Messenger - Fizban1216@hotmail.com
    • AOL Instant Messenger - Fizban1216
    • View Profile
    • Email
Re: Trigedit Help Requested
« Reply #6 on: May 08, 2008, 02:40:00 pm »
Quote
*doh*  Yep, was me.  Wanted a greet script not an enter script.  NOW I can continue.

Oh dear, how did I overlook that (and Mordecai as well for that matter)?

For those that don't realize what the issues ie:

Greet Scripts fire when a player enters the room that the mob is in.

Enter scripts fire when the mob enters a room.

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 728
    • View Profile
    • Email
Re: Trigedit Help Requested
« Reply #7 on: May 08, 2008, 03:35:26 pm »
Because you all think I know how to do what I want...  And usually I think that too.  It's when they fail that I begin getting buggy about it.  *peers around innocently*  Once you got your script to work, I realized that it must be in one of my assumptions and figured that was it (hence the visit to Oasis instead of TBA).

Kvetchy

Leonardo

  • Guest
Re: Trigedit Help Requested
« Reply #8 on: May 09, 2008, 06:06:18 am »
It looks fine.
I mean, super abusable but fine.

Mordy is so funny sometimes :-P


I suggest that when you start building a script you start by knowing what you're going to do, so if you're building a Greet script learn how it works what different NArgs do, etc..
If you don't how to build what you imagined yet, read the list of trigedit options and examples, you'll certainly find a way to achieve what you want.

Check this resource, it helps me a lot while building scripts, especially when some time pass since my last script and I start forgetting some of the valuable information.

http://www.builderacademy.net/Oasis_DG_pages/contents/triggers.htm
« Last Edit: May 09, 2008, 06:12:32 am by Leonardo »

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 728
    • View Profile
    • Email
Re: Trigedit Help Requested
« Reply #9 on: May 09, 2008, 08:16:10 am »
Umm.. yeah... :P

been there, done that.  I'm probalby the one that gave you that address.  That's the address i go to when I say Oasis OLC.  I was just confused between enter and greet due to the fact that it seemed at the time that enter should work when a player enters a room, not when the mob enters a room.  I was wrong. I do have an idea what I'm doing when I script, but most of my info for quick lookup is on my laptop which I haven't been able to use since I moved to dialup.

Later

Offline Fizban

  • Maniacal Scroder!
  • Administrator
  • Full Member
  • *****
  • Posts: 183
  • Fizban, the Mangy Wizard
    • MSN Messenger - Fizban1216@hotmail.com
    • AOL Instant Messenger - Fizban1216
    • View Profile
    • Email
Re: Trigedit Help Requested
« Reply #10 on: May 11, 2008, 08:28:28 pm »
That site's lame. It's also about 4 years out of date. TBA Helpfiles > builderacademy's Oasis pages.

Offline erwin

  • Sr. Member
  • ****
  • Posts: 314
    • View Profile
Re: Trigedit Help Requested
« Reply #11 on: May 11, 2008, 10:19:06 pm »
Hey all, I have some problems with this script, as it does work, yet in another sense, doesn't really work.
Code: [Select]
Name: 'Script 1',  VNum: [46035], RNum: [ 1862]
Trigger Intended Assignment: Mobiles
Trigger Type: Speech, Numeric Arg: 100, Arg list: *
Commands:

<something else>
elseif %speech.contains(%answer%)%
<do something>

Ok, %answer% is randomly generated, but saying %answer% only works in some cases. Let's say %answer% is 50.
Then, 'say 50' will not trigger the script.
However, 'say 123450' , 'say You look like 50 years old', 'say ABC50', 'say           50',  will trigger the script.
The only thing I can gather is that the script works if there is at least one character before the value %answer%.

Is there a way such that 'say 50' will work? Would appreciate any help on this :)


Offline Fizban

  • Maniacal Scroder!
  • Administrator
  • Full Member
  • *****
  • Posts: 183
  • Fizban, the Mangy Wizard
    • MSN Messenger - Fizban1216@hotmail.com
    • AOL Instant Messenger - Fizban1216
    • View Profile
    • Email
Re: Trigedit Help Requested
« Reply #12 on: May 11, 2008, 11:20:24 pm »
if %speech% == %answer% || %speech.contains(%answer%)%

Offline Kvetch

  • Administrator
  • Hero Member
  • *****
  • Posts: 728
    • View Profile
    • Email
Re: Trigedit Help Requested
« Reply #13 on: May 12, 2008, 04:38:03 pm »
That site's lame. It's also about 4 years out of date. TBA Helpfiles > builderacademy's Oasis pages.

It's also easier for me to find things on there than to try to figure out what to request help on when I'm on TBA.  I know, I could just go "Rumble, I'm looking for this, what to I ask for on help?" but I like to be able to find it myself.  I'm sure there's some easy way.. wanna share it?

Offline Fizban

  • Maniacal Scroder!
  • Administrator
  • Full Member
  • *****
  • Posts: 183
  • Fizban, the Mangy Wizard
    • MSN Messenger - Fizban1216@hotmail.com
    • AOL Instant Messenger - Fizban1216
    • View Profile
    • Email
Re: Trigedit Help Requested
« Reply #14 on: May 12, 2008, 09:10:04 pm »
These are the only helpfiles you will almost 'ever' need.

help text var
help char var
help room var
help obj var
help trig-<intended>-<type> (ie. help trig-room-command)