Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   A few Questions (https://forums.graalonline.com/forums/showthread.php?t=40743)

billybob53 11-29-2002 04:14 AM

A few Questions
 
Hi, Im not a newbie scripter, and am workign on a playerworld for Graal.

I just have a few questions:

1.) How do you use Sin and Cos to make an NPC move in a circular angle?

2.) How do you make a Guild?

3.) Whats the command to remove a weapon forom the player's weaponlist?

4.) How do you make an NPc affect a .txt file?

Thanks for helping!

Torankusu 11-29-2002 05:35 AM

Re: A few Questions
 
Quote:

Originally posted by billybob53
Hi, Im not a newbie scripter, and am workign on a playerworld for Graal.

I just have a few questions:

1.) How do you use Sin and Cos to make an NPC move in a circular angle?

2.) How do you make a Guild?

3.) Whats the command to remove a weapon forom the player's weaponlist?

4.) How do you make an NPc affect a .txt file?

Thanks for helping!

1.) Radians and such...(I think...)

2.) Through an NPC? You'll need an NPCserver.
If so, you need to have the txt files in the guilds section of the playerworld's FTP, and you'll need to use the addguildmember and removeguildmember commands to add and remove people from that guild file.

3.) "removeweapon weapon name"
This is an NPCserver only command as well.

4.) Affect in what way? You could use the savelog commands to save information in a specific text file.

Python523 11-29-2002 09:17 AM

not to be mean but don't expect to get every answer given to you, documents exist for a reason

Spark910 11-29-2002 08:10 PM

<Comment removed>

Falcor 11-30-2002 02:06 AM

Spark, Was that comment really necissary?

billybob53 11-30-2002 03:48 AM

does the removeweapon command only work online?

And is this the format?

if (playertouchsme){
removeweapon:Mech Spyder;
}

Python523 11-30-2002 04:32 AM

Quote:

Originally posted by Falcor
Spark, Was that comment really necissary?
=/ i think it was, people who say they are good at things they arent annoys me


and its removeweapon weaponname; and you need an npc server for that

billybob53 11-30-2002 04:42 AM

QUOTE]and its removeweapon weaponname; and you need an npc server for that[/QUOTE]

so u put the script in the NPC but it needs an NPC server to operate then?

And 1 more thing...

"I used if (playerchats&&(blah)&&hasweapon(Mech Spyder)){
toweapons mech...... and so on....."

But it didn't work when the player Had the weapon called Mech Spyder or without the weapon mech spyder X_x

Help:grrr:

Ningnong 11-30-2002 06:54 AM

First of all you have to use this format:

if (playerchats && strequals(#c,text))

not

if (playerchats && (blah)) etc..

Well anyway.

I dont really understand you :

When the player says something, and has the weapon Mech Spider...he should get mech spider? I dont really follow.

Maybe it's just me, it's late >_<

The only thing i could think you mean is...:

English: if the player says something and "does not" have the weapon Mech Spider, give the player mech spider...

Script:

if (playerchats && strequals(#c,text) && !hasweapon(mech spider)){toweapons Mech Spider;}

Note: toweapons only works offline.

If thats not what u meant then oh well. *signs off*

bai :)

Falcor 11-30-2002 07:41 AM

Quote:

Originally posted by Python523

=/ i think it was, people who say they are good at things they arent annoys me

He probably only said that because he saw how badly newbie scripters are treated, these kinds of comments arent bettering it either. The newbie just need to realise its not your ignorance that annoys us, its just your lack of common sence, things like asking for entire script or a premade script they saw on BM...

billybob53 11-30-2002 06:19 PM

i don't quite get your message falcor.... but nvm.

I was meant to put strequals in the script but i was rushing.


Im doing it in offline mode.
You have the weapon Mech Spyder and you goto the upgrade factory and i used this:

if (playerchats&&strequals(#c,Upgrade Mech Spyder)&&hasweapon(Mech Spyder)) {
removeweapon: Mech Spyder;
toweapons Mech Spyder 2;
}

if (weaponfired){
blah......
}


Note: This is in Offline mode and it won't work so help plz

osrs 11-30-2002 07:39 PM

Quote:

Originally posted by billybob53
i don't quite get your message falcor.... but nvm.

I was meant to put strequals in the script but i was rushing.


Im doing it in offline mode.
You have the weapon Mech Spyder and you goto the upgrade factory and i used this:

if (playerchats&&strequals(#c,Upgrade Mech Spyder)&&hasweapon(Mech Spyder)) {
removeweapon: Mech Spyder;
toweapons Mech Spyder 2;
}

if (weaponfired){
blah......
}


Note: This is in Offline mode and it won't work so help plz


addweapon/removeweapon doesnt work in offline mode.
When you use addweapon/removeweapon (as Serverside) you dont need make it:

"addweapon:Mech Spyder"

just do it: addweapon/removeweapon <weaponname>,
without ":"

HoudiniMan 11-30-2002 08:07 PM

It still needs to be on an NPC Server driven environment... if you don't know anything about this you might want to get somebody to help you 1 on 1 and not try to make a player world... if you do, then you know where to go from here

osrs 11-30-2002 11:59 PM

Quote:

Originally posted by HoudiniMan
It still needs to be on an NPC Server driven environment... if you don't know anything about this you might want to get somebody to help you 1 on 1 and not try to make a player world... if you do, then you know where to go from here
You're wrong..
When you're making a playerworld you will start to learn a lot of things.
Make a playerworld is a good way to get better.

Torankusu 12-01-2002 01:18 AM

Quote:

Originally posted by osrs


You're wrong..
When you're making a playerworld you will start to learn a lot of things.
Make a playerworld is a good way to get better.

NO.

Doing PROJECTS such as scripting things and making more levels is a good way to get better. Making some P.O.S. Playerworld (No offense or anything) is not guaranteed to enhance your skills, especially when you have people working for you.

billybob53 12-01-2002 04:16 AM

Quote:

1.) how do you make a guild?
Could you give me a breif Example of how to use the commands plz?

Quote:

5.) how do you use an NPC to save logs?
Can i have a brief code example of that too please?

Torankusu 12-01-2002 12:00 PM

Quote:

Originally posted by billybob53


Could you give me a breif Example of how to use the commands plz?



Can i have a brief code example of that too please?

How about looking them up?

I think they might be in the commands.rtf, but I'm not entirely sure. newfeatures2001/2.txt is also a good place to look...

osrs 12-01-2002 11:03 PM

Quote:

Originally posted by Torankusu
NO.

Doing PROJECTS such as scripting things and making more levels is a good way to get better. Making some P.O.S. Playerworld (No offense or anything) is not guaranteed to enhance your skills, especially when you have people working for you.


I think making a pw is a good way to learn..

billybob53 12-01-2002 11:29 PM

I looked in the .txt's and .rtf's but no help.....

I also searched by keyword as many times and words that i could think of but no luck.

Could someone plz give me some examples for the awnsers to my above questioms PLZ!

osrs 12-02-2002 12:53 AM

Quote:

Originally posted by billybob53

5.) how do you use an NPC to save logs?

NPC Code:

savelog2 'txtname'.txt,<what you want to save>;


Python523 12-02-2002 02:33 AM

i think this topic should be closed, yes asking questions IS a good way of learning but you wont learn anything if you keep on asking for help too much


All times are GMT +2. The time now is 03:07 AM.

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