Egoboo Forum

The Legend of Egoboo Sporks of Yore
EgoScript Functions
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
 
Post new topic   Reply to topic    Egoboo Forum Forum Index -> -> Help
View previous topic :: View next topic  
Author Message
Zefz
Lead Designer
Lead Designer


Joined: 16 Sep 2007
Posts: 2301
Location: Norway

PostPosted: Mon Jan 21, 2008 7:53 am    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Quote:
Oh, I forgot! We need functions that check if the date or time is at something specific. Can we do that very easily or no?


Yeah should be fairly easy. We need to make a check for the system time or the like.

Quote:
I wouldn't know...
Anyway, is it possible to change the top running speed of a given mountable to something higher when a character who has a special ability?


The fastest way I can think of is give the mount a 75% speed when having a unskilled rider and 100% with a skilled one.

Code:

SetTargetToRider
  tmpargument = YOURSKILL
  IfTargetHasSkill
    Run                     //100%
  Else
    Walk                    //66%
Else
  Walk                      //66%

_________________
http://egoboo.sourceforge.net

"The pen is mightier than the sword- IF it is sharpened, dipped in poison and thrown really really hard at your target. But seriously, you are better off with a sword."
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
woodmouse
Skinner
Skinner


Joined: 19 Apr 2008
Age: 13
Posts: 3061
Location: Finland

PostPosted: Sun Apr 20, 2008 4:06 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

What's wrong with this script (it's the peasants of the Vampyre starter module)? I mean, I looked the Parseerr but there just read that:

modules/vampyre.mod/objects/peasant.obj/script.txt - KillPlayer undefined
modules/vampyre.mod/objects/peasant.obj/script.txt - AttackMadly undefined
modules/vampyre.mod/objects/peasant.obj/script.txt - Attack undefined
modules/vampyre.mod/objects/peasant.obj/script.txt - Attack undefined
modules/vampyre.mod/objects/peasant.obj/script.txt - Attack undefined
modules/vampyre.mod/objects/peasant.obj/script.txt - Attack undefined

The peasant's script:


//The states
//0: Walking around the city
//1: Attack to the player
//2: In combat go mad

// Get mean if characters wanna be bad
IfAttacked
KillPlayer
AttackMadly //Go mad!
JoinGoodTeam
tmpargument = 2
SetState
IfCalledForHelp
JoinGoodTeam
Attack

IfSpawned
tmpargument = rand % 4 //Randomize skin
ChangeArmor
Attack //Kill the player!

//------------------------------------------------------------------------------
// ZZ> Handle normal state
IfTimeOut
tmpargument = 80 + rand & 200
SetTime

//ATTACK PLAYER
IfStateIs0
tmpx = rand & 2024 - 1012 + selfx
tmpy = rand & 2024 - 1012 + selfy
tmpturn = rand & 512 - 256 + selfturn
Compass
ClearWaypoints
AddWaypoint
SetTargetToNearbyEnemy //Enemy near, go combat mode
tmpargument = 2
SetState
tmpargument = 50
SetTime
Attack

//IDLE OR RETURN TO START
IfStateIs1
tmpx = selfspawnx //Just attack the player
tmpy = selfspawny
ClearWaypoints
AddWaypoint
SetTargetToNearbyEnemy //Enemy near, go combat mode
tmpargument = 2
SetState
tmpargument = 50
SetTime
Attack

//IN COMBAT
IfStateIs2
SetTargetToNearbyEnemy
IfFacingTarget //Scooch around randomly
tmpx = targetdistance
tmpy = 100
IfXIsLessThanY
tmpargument = LATCHRIGHT
PressLatchButton
Else
tmpx = targetx //Get in combat position
tmpy = targety
tmpturn = targetturnto
tmpdistance = 200
Compass
ClearWaypoints
AddWaypoint
Else
tmpargument = 0
SetState
tmpargument = 60
SetTime

//What to do if bumped
IfBumped
SetTargetToWhoeverBumped
IfTargetIsOnHatedTeam
IfFacingTarget //Attack player
tmpargument = LATCHRIGHT
PressLatchButton
Else
tmpx = targetx //Move towards enemy
tmpy = targety
ClearWaypoints
AddWaypoint
Else
tmpx = rand & 511 - 256 + selfx //Scooch around the player
tmpy = rand & 511 - 256 + selfy
tmpdistance = 100
tmpturn = targetturnto + 32768
Compass
ClearWaypoints
AddWaypoint
SetTargetToOldTarget

//------------------------------------------------------------------------------
End
//------------------------------------------------------------------------------



And I have another question: How could I make there a bat that would follow the player all the time?
_________________


Last edited by woodmouse on Sun Apr 20, 2008 4:26 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Clonkinator
Master Frying Pen (Moderator)
Master Frying Pen (Moderator)


Joined: 03 Nov 2007
Age: 15
Posts: 3074
Location: Germany

PostPosted: Sun Apr 20, 2008 4:10 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

"KillPlayer" and "AttackMadly", as well as "Attack" don't exist. That's why. Confused
_________________
Yes, it's true. I fail. Epicly so.
Back to top
View user's profile Send private message Send e-mail
woodmouse
Skinner
Skinner


Joined: 19 Apr 2008
Age: 13
Posts: 3061
Location: Finland

PostPosted: Sun Apr 20, 2008 4:15 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Oh, but they attack madly... But how could I make them to attack JUST the player? I mean, that they shouldn't run in the city, just attack.
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Chainsaw
Lumberjack
Lumberjack


Joined: 20 Oct 2007
Age: 15
Posts: 2378
Location: Israel

PostPosted: Sun Apr 20, 2008 5:09 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Clonkinator wrote:
"KillPlayer" and "AttackMadly", as well as "Attack" don't exist. That's why. Confused


He never used those commands, they were comments.
_________________
"To err is human, to really mess up requires a computer."
Chainsaw's Cell [Last update: 27th May '08]
Back to top
View user's profile Send private message Send e-mail
Clonkinator
Master Frying Pen (Moderator)
Master Frying Pen (Moderator)


Joined: 03 Nov 2007
Age: 15
Posts: 3074
Location: Germany

PostPosted: Sun Apr 20, 2008 6:36 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Chainsaw wrote:
Clonkinator wrote:
"KillPlayer" and "AttackMadly", as well as "Attack" don't exist. That's why. Confused


He never used those commands, they were comments.

No, they weren't commented out. It makes sense with the log output, too.
_________________
Yes, it's true. I fail. Epicly so.
Back to top
View user's profile Send private message Send e-mail
woodmouse
Skinner
Skinner


Joined: 19 Apr 2008
Age: 13
Posts: 3061
Location: Finland

PostPosted: Sun Apr 20, 2008 6:38 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

What should I script there?
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
penguinflyer5234
Penguin King


Joined: 01 Feb 2008
Age: 15
Posts: 1669
Location: Somewhere

PostPosted: Sun Apr 20, 2008 7:12 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

KillPlayer: You could do:
Code:

IfAttacked
  SetTargetToWhoeverAttacked
  tmpargument = 4096 // 16 life points!
  DamageTarget

_________________
You really thought so, didn't you?
Donna Noble has left the library. Donna Noble has been saved.
Back to top
View user's profile Send private message
woodmouse
Skinner
Skinner


Joined: 19 Apr 2008
Age: 13
Posts: 3061
Location: Finland

PostPosted: Sun Apr 20, 2008 7:16 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

On the every place where it is? Shocked
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Clonkinator
Master Frying Pen (Moderator)
Master Frying Pen (Moderator)


Joined: 03 Nov 2007
Age: 15
Posts: 3074
Location: Germany

PostPosted: Sun Apr 20, 2008 7:19 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

penguinflyer5234 wrote:
KillPlayer: You could do:
Code:

IfAttacked
  SetTargetToWhoeverAttacked
  tmpargument = 4096 // 16 life points!
  DamageTarget

What? You want the player to take 16 points of damage if he hits an enemy!? Shocked
_________________
Yes, it's true. I fail. Epicly so.
Back to top
View user's profile Send private message Send e-mail
penguinflyer5234
Penguin King


Joined: 01 Feb 2008
Age: 15
Posts: 1669
Location: Somewhere

PostPosted: Sun Apr 20, 2008 7:20 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

There is only one place where KillPlayer is in that script.
_________________
You really thought so, didn't you?
Donna Noble has left the library. Donna Noble has been saved.
Back to top
View user's profile Send private message
woodmouse
Skinner
Skinner


Joined: 19 Apr 2008
Age: 13
Posts: 3061
Location: Finland

PostPosted: Sun Apr 20, 2008 7:23 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

I want the peasants to attack like the wizard shop's Zambini. No magic, but the rage of the attacks and they would just run and be wise, like they wouldn't stuck in the walls. How could I make it?
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Zefz
Lead Designer
Lead Designer


Joined: 16 Sep 2007
Posts: 2301
Location: Norway

PostPosted: Sun Apr 20, 2008 9:39 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Kill the current target of the peasant
Code:
KillTarget


Make the peasant attack

Code:

IfTargetIsOnHatedTeam
  IfFacingTarget
    tmpx = targetdistance
    tmpy = 200
    IfXIsLessThanY
      tmpargument = LATCHRIGHT
      PressLatchButton


This is a very normal way to make AI attack enemies that are nearby and facing him. (uses right hand to attack)
_________________
http://egoboo.sourceforge.net

"The pen is mightier than the sword- IF it is sharpened, dipped in poison and thrown really really hard at your target. But seriously, you are better off with a sword."
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
woodmouse
Skinner
Skinner


Joined: 19 Apr 2008
Age: 13
Posts: 3061
Location: Finland

PostPosted: Mon Apr 21, 2008 1:28 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Uhm... Zefz... That script you posted... IT MAKES THE PLAYER DIE!!! I mean, if I attack them, the player just dies...
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Zefz
Lead Designer
Lead Designer


Joined: 16 Sep 2007
Posts: 2301
Location: Norway

PostPosted: Mon Apr 21, 2008 1:29 pm    Post subject: If a post contains some illegal issues you may abuse on it - just click Abuse and fill the form Reply with quote

Yes it was what you asked for.
_________________
http://egoboo.sourceforge.net

"The pen is mightier than the sword- IF it is sharpened, dipped in poison and thrown really really hard at your target. But seriously, you are better off with a sword."
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Egoboo Forum Forum Index -> -> Help All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 2 of 10

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


© 2007 Informe.com. Get Free Forum Hosting
Powered by phpBB © 2001, 2005 phpBB Group

RedSilver 1.01 Theme was programmed by DEVPPL HTML Forum
Images were made by DEVPPL Photoshop Forum