[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Need assistance on figuring something out.

Need assistance on figuring something out.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by David B   USA  (80 posts)  [Biography] bio
Date Fri 23 May 2003 07:32 AM (UTC)

Amended on Fri 23 May 2003 07:36 AM (UTC) by David B

Message
Ok, The first part of scripting it seems is knowing exactly what you need to do and the order you need to do it in.

With that in mind, here is what I need to script.
I enter the first room. There are 3 exits and 3 mobs, followed by my prompt.

Now with all that said, simple triggers, and variables here are not going to work for me, atleast not in the way I was hoping. My idea, is pretty simple. it should take several small scripts and some fancy variable work. I haven't use the mathematical aspect of scripting yet so I do not completely understand it.

I'll outline what I was thinking, then maybe someone can assist me translating that into code.

[Exits: [east] south west]
[ Huleku ] A shaggy looking huleku stands here chewing its cud.
[ Small Huleku ] A huleku calf would jump and play, but it fears hitting the wall.
[ Small Huleku ] A huleku calf would jump and play, but it fears hitting the wall.

<100%HP 100%Mana>
<97%Move 69%TNL><T>


I start my script with an alias. It attacks the first Huleku calf, the second huleku calf, and the shaggy huleku all at the same time (I can use bash to intiate combat with multiple mobs<bash calf, bash 2.calf, bash shag>).

At this point I have triggers for the death of each type of mob.
A shaggy huleku has been defeated!!
A huleku calf has been defeated!!

Also at this time, the calf triggers are disabled(note, I'm almost to the part I am stuck at). Once the shaggy Huleku dies(being the very last mob I engage and kill), it disables the shaggy death trigger, enables the Calf death trigger, at the same time it also runs a script which creates a variable of some kind that tells me phase 1 is done, and it sends me to the west.

 [Exits: east south]

      [large   ] A bale of dried purple moss is here looking dry and dusty.
[ Huleku ] A shaggy looking huleku stands here chewing its cud.
[ Small Huleku ] A huleku calf would jump and play, but it fears hitting the wall.

<100%HP 100%Mana>
<98%Move 69%TNL><T>


It starts the combat with the shaggy huleku first, and the huleku calf second.
Now that the shaggy trigger is off, it will ignore the death trigger. When the calf dies, it again runs a script, sending me south, and changes another variable(to what I don't know). So the death of the calf(which is easy part) send me to the south.

[Exits: north east]
[ Huleku ] A shaggy looking huleku stands here chewing its cud.
[ Huleku ] A shaggy looking huleku stands here chewing its cud.
[ Small Huleku ] A huleku calf would jump and play, but it fears hitting the wall.
[ Small Huleku ] A huleku calf would jump and play, but it fears hitting the wall.

<100%HP 100%Mana>
<98%Move 69%TNL><T>


Here is where it gets tricky. I am not sure what to do from here now, I think I have to have the script check the variables, and re-create the triggers (probably back when the shaggy trigger enables the calf triggers, and gets disabed). Anyways... I need to kill all four of these mobs in this room above here. and move onto the next room towards the east.(see below)

[Exits: north east west]
[ Huleku ] A shaggy looking huleku stands here chewing its cud.

<100%HP 100%Mana>
<99%Move 69%TNL><T>


Again, need to the one mob in this room, and move to the east again.

[Exits: [north] west]
[ Huleku ] A shaggy looking huleku stands here chewing its cud.

<100%HP 100%Mana>
<98%Move 69%TNL><T>


Now, To the last room, if i can figure out how to get this far, i can map out the rest without help from here. Need to kill this mob, and open the door, and the scrip is done.

My problem is setting up the triggers, and the variables. I'm hoping it won't be too terribly complicated. I'll beable to use this same script on several other area's that i wish to do this too, once I understand how it works, I should beable to script several other area's that are more complicated. I figured I'd start with something a little easier.

My code(with a LOT of Nicks help) to fame:

sub OnAutoCombo (TriggerName, TriggerLine, arrWildCards)
dim AutoCombo
AutoCombo = split (arrWildCards (1))
Dim i, attack
for i=lbound (AutoCombo ) to ubound (AutoCombo )
Select Case AutoCombo (i)
case "rp" attack = "punch right"
case "lp" attack = "punch left"
case "s" attack = "sweep"
case "r" attack = "roundhouse"
case else attack = "" ' unknown attack type
End Select
if i = ubound (AutoCombo ) then
world.send "throw " + world.getvariable ("attacker") + " down"
else
world.send attack + " " + world.GetVariable ("attacker")
end if
next
end sub
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


6,993 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]