Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-05-2002, 07:48 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
The LH Scripting Questions Thread

Alright, u guys are prolly sick of all my threads and questions so I will ask here and answer if you (and will)

My first question is...

say you have a gani (single dir) that is 8 frames and its the exact same as the normal walk gani going left accept its single dir and it has slight modifications. How would you script it so it replaced it when they walk?
Reply With Quote
  #2  
Old 02-05-2002, 07:55 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
replaceani walk,whateverganiofyours;
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #3  
Old 02-05-2002, 08:50 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
first off this wouldnt work cuz this is a single dir gani so setani wont work
Reply With Quote
  #4  
Old 02-05-2002, 08:53 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Hmm, are you allowed to use multiframe single dir ganis on free? I thought you could only use the default ones and single frame and dir ganis
Reply With Quote
  #5  
Old 02-05-2002, 08:59 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
Thumbs up

Non-P2P should be allowed to use stuff that modifys the walking npc, like adding a backpack or such, anything else that is not legal should be out the door. There is no use for gani on a non-p2p server.
Reply With Quote
  #6  
Old 02-05-2002, 09:55 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
except **** like the jumprope <3
Reply With Quote
  #7  
Old 02-05-2002, 10:07 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
free can use the jump rope but its ***, however, free servers can use multi frame single dir ganis. Anyways, i just modified the walking NPC and im trying to make this work. Anyone with any ideas?
Reply With Quote
  #8  
Old 02-05-2002, 10:16 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
fine, then do this:

NPC Code:

if (created) {
replaceani walk,newalk;
toweapons -ganisystem; }
if (isweapon) { timeout=.05; }
if (timeout) {
if (playerdir!=1) {
playerdir=1;
}
timeout=.05; }

__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #9  
Old 02-05-2002, 01:28 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
non-p2p can use multi-framed single dir. prooved when some guy so keenly pointed out that you could make go karts for non-p2p...what a smart guy...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #10  
Old 02-05-2002, 06:25 PM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
Quote:
Originally posted by TDK_RC6
fine, then do this:

NPC Code:

if (created) {
replaceani walk,newalk;
toweapons -ganisystem; }
if (isweapon) { timeout=.05; }
if (timeout) {
if (playerdir!=1) {
playerdir=1;
}
timeout=.05; }

No Pay => no replaceani k?
__________________
No Webhost at the moment
Reply With Quote
  #11  
Old 02-05-2002, 06:59 PM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
Anyone have any ideas? If not is there a way to display a chosen frame? like setani name,frame,;
__________________

Check out the development at:
http://razza.org/lordhelmut/FantasyTales/index
Reply With Quote
  #12  
Old 02-05-2002, 08:08 PM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
forgot it was nonP2P, sorry

if you want it to specify a specific gani or something

NPC Code:

if (created) {
toweapons -ganisystem;
this.frametime=.4; // Length of GANI
setani newaniname,; }
if (isweapon) { timeout=.05; }
if (timeout) {
playerdir=1;
if (this.frametime>0) {
this.frametime-=.05;
} else { setani newaniname,; this.frametime=.4; }
timeout=.05; }

__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #13  
Old 02-06-2002, 06:15 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
what about a menu? are menus using showimg hard to make?
__________________

Check out the development at:
http://razza.org/lordhelmut/FantasyTales/index
Reply With Quote
  #14  
Old 02-06-2002, 06:55 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Menu? yesh. the one i sent you was fairly simple. If you want to you can easily add and remove items from the menu, etc. I can chat with u on how to make it own.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #15  
Old 02-06-2002, 06:58 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
//NPC Made By LORD HELMUT
if(created){
this.max=7;
}
if(playerchats) {
tokenize #c;
if(strequals(#a,#I(server.ph1tenants,0))){
//add new Tenant
if(startswith(AddTenant,#c)){
if(sarraylen(server.ph1tenants) <= this.max){
addstring server.ph1tenants,#t(1);
}
else {
setplayerprop #c,You already have #v(sarraylen(server.ph1tenants)-1) tenants!; //-1 cause of the owner
}
}
//remove tenant
if(startswith(RemoveTenant,#c)){
removestring server.ph1tenants,#t(1);
}
}
}

thats a ghetto old script I made but remove tenant wont work =/ I say removetenant lordhelmut and it no workie
__________________

Check out the development at:
http://razza.org/lordhelmut/FantasyTales/index
Reply With Quote
  #16  
Old 02-06-2002, 07:42 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
a menu is simple

thats what im working on right now, but it is like 4 or 5 combined into one :S
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #17  
Old 02-06-2002, 08:51 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
how exactly do u make them?
__________________

Check out the development at:
http://razza.org/lordhelmut/FantasyTales/index
Reply With Quote
  #18  
Old 02-06-2002, 08:54 AM
Cybnext_Design Cybnext_Design is offline
Registered User
Join Date: Jun 2001
Posts: 244
Cybnext_Design is on a distinguished road
Send a message via AIM to Cybnext_Design
Quote:
Originally posted by lordhelmut
<script>

thats a ghetto old script I made but remove tenant wont work =/ I say removetenant lordhelmut and it no workie
Why is it that everytime I make something, somehow you lose it? If you want, I'll remake or try and find it again.
__________________
Graal2001 NPC Maker
Frolic Owner
Aim: C Y B N E X T
Reply With Quote
  #19  
Old 02-06-2002, 08:54 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
well lets see, make the menu image

then use
showimg index,imagename,x,y;
changeimgvis index,4;

then it all depends on what you want
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #20  
Old 02-06-2002, 09:39 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
// NPC made by Golem
if (playertouchsme) {
this.pos=0;
disabledefmovement;
setani idle,;
timeout=.05;
}
if(timeout&&this.pos=0){
showimg 200,@Arial@cb@->Deposit,(screenwidth/2),(screenheight/2-120);
showimg 201,@Arial@cb@Withdrawl,(screenwidth/2),(screenheight/2-100);
changeimgvis 200,4;
changeimgvis 201,4;
if(keydown(2)&&this.pos=0){
this.pos=1;
showimg 200,@Arial@cb@Deposit,(screenwidth/2),(screenheight/2-120);
showimg 201,@Arial@cb@->Withdrawl,(screenwidth/2),(screenheight/2-100);
changeimgvis 200,4;
changeimgvis 201,4;
}
if(keydown(2)&&this.pos=1){
timeout=.05;
}
timeout=.05;
}


HOW IS THAT SO FAR
__________________

Check out the development at:
http://razza.org/lordhelmut/FantasyTales/index
Reply With Quote
  #21  
Old 02-06-2002, 08:14 PM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
ahhhhh, im sorry i just dont like showimg text menus
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #22  
Old 02-06-2002, 11:08 PM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
-=Josey=-
This may not be the best for advanced scripts, but since you were asking how, you most likely won't be making any advanced ones yet.

/*
NPC made by Josey Hunt.
This is a simple menu selector.
*/
if (playertouchsme){
doImages();
disabledefmovement;
}

function doImages(){
showimg 1,@~ Test,50,200;
showimg 2,@Exit,50,250;
this.selected=0;
doZoom();
this.enabled=1;
timeout=.05;
}
if (timeout&&this.enabled=1){
doKeyCheck();
timeout=.05;
}
function doKeyCheck(){
if (keydown(2)&&this.selected=0){
this.selected=1;
showimg 1,@Test,50,200;
showimg 2,@~ Exit,50,250;
}
if (keydown(0)&&this.selected=1){
this.selected=0;
showimg 1,@~ Test,50,200;
showimg 2,@Exit,50,250;
}
if (keydown(5)){
if (this.selected=0){
say2 Testing!;
}
if (this.selected=1){
Exit();
}
}
doZoom();
timeout=.05;
}
function doZoom(){
changeimgvis 1,4;
changeimgzoom 1,.6;
changeimgcolors 1,0,0,0,255;
changeimgvis 2,4;
changeimgzoom 2,.6;
changeimgcolors 2,0,0,0,255;
}
function Exit(){
showimg 1,,,;
showimg 2,,,;
enabledefmovement;
timeout=0;
this.enabled=0;
}
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #23  
Old 02-07-2002, 03:30 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
Yea that helped a lot =D thanks
__________________

Check out the development at:
http://razza.org/lordhelmut/FantasyTales/index
Reply With Quote
  #24  
Old 02-07-2002, 03:58 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
-=Josey=-
You're welcome. ;D
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #25  
Old 02-07-2002, 04:00 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
-=Josey=-
Well I think that I've beaten insomnia right about now. So it's time for me to take my weekly slumber. Later everyone.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #26  
Old 02-12-2002, 03:20 AM
lordhelmut lordhelmut is offline
Registered User
lordhelmut's Avatar
Join Date: Aug 2001
Posts: 710
lordhelmut is on a distinguished road
Send a message via ICQ to lordhelmut Send a message via AIM to lordhelmut Send a message via Yahoo to lordhelmut
Couple Questions...

One, for a NPC like a system or something, how do you have it ALWAYS checking for like a keydown or an action or something?

Second, Whats the best way to script a chase script for a boss or baddie that should go after the nearest player. (I know player index but I dont understand how to use it)
__________________

Check out the development at:
http://razza.org/lordhelmut/FantasyTales/index
Reply With Quote
  #27  
Old 02-12-2002, 04:17 AM
neomaximus2k neomaximus2k is offline
Registered User
Join Date: Feb 2002
Location: UK
Posts: 324
neomaximus2k is on a distinguished road
Send a message via ICQ to neomaximus2k
Shiw Image

Well i am working ona few sho image menu's for asteria at the moment, so if you still havn't got it sorted out drop me a line
__________________
Beware of thy Inner self
NPC Code:

_.,.__
((o\\o\))
.-. ` \\``
__( )___.o"".,___
=== ~~~~~~~~
==
= Neo

Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.