Author Topic: RPG questing help  (Read 6786 times)

0 Members and 1 Guest are viewing this topic.

DeathAdder

  • Orc Thrasher
  • ***
  • Posts: 137
  • Reputation: +0/-0
    • http://www.los.planetubh.com
RPG questing help
« on: October 10, 2003 02:54 pm CDT »
LastWish has been a great help with me and giving a site i can learn to do admin stuff with and I want to take this knowledge further.^_^

I have a really complicated and good quest planned out in my head and I think i have only one issue i need help with.

The backbone of the quest is the problem. I need a bot that will ask a person/everyone who talks to it, One thing to start out with which is list a bounch of items/money it needs for the quest. I want the bot to be able to look in the persons invin that is talking to it and if they don't have the item it needs the bot tells them to get the item. Than if they do have it ask for the item you say Yes or something and it takes it and starts a new block asking for another item untill it gets to the end of the chain and has all the items than the rest i can think of and i'll come back if i have another problem.

To sum it up i need a bot from scratch that takes items and will be able to take the item from the person talking to it and than move on so that no one will give it the same thing twice or like have it ask for lets say a stone from Joe, Joe gives the stone and than Mark comes after and talks to the bot and gets asked for a weapon and than joe after mark gets asked for the same weapon untill one of the 2 gives it and than the bot moves on.

If i've confused or I no sence make any let me know i'll try to clarify a specific action. Please help :)
« Last Edit: December 31, 1969 06:00 pm CST by DeathAdder »
<img src="http://www.pcrpg.org/pics/hosted/dadder.jpg">

Lidge Farkley

  • Uber Menace
  • *******
  • Posts: 1,357
  • Reputation: +2/-3
    • http://www.angelfire.com/ca2/psychosworld2/
(No subject)
« Reply #1 on: October 10, 2003 03:10 pm CDT »
http://www.angelfire.com/rpg2/susanthetraveler

It's a pretty good guide to making quests.
If you follow the link in my signature it will take you to my site which has a trpg quest scripting tool for download and links in the credits section to other peoples pages with admin help (tridents.)

I'd start at susan't page first though and read into how she does stuff.  Hersh is good at quest scripting from what I hear, but he is so busy I don't know when he might be on to check this and help you out.

Also, is this going to be a seperately launched quest script, or one that is integarated into the .mis file of the map?  If you're going with option 2, you can open up the rpgmap5.mis file and look at how bots are done there.  It's a bit of sorting, but once you figue it out (which can be a pain in the ass) then you'll be able to add your bots to the .mis file and have them constantly be a part of the server.

hmmm........  I don't know what else I can say now about this! :-p
« Last Edit: December 31, 1969 06:00 pm CST by Lidge Farkley »
Lend your heart unto the divine mineral TOPAZ;
from which our reverent hearts and minds sprang.
Also Known As:  Alcoholic 007
My Page of tribes Tools and Helpful "FAQ" Stuff

LastWish

  • What's Yours?
  • Uber Menace
  • *******
  • Posts: 1,743
  • Reputation: +0/-0
(No subject)
« Reply #2 on: October 10, 2003 03:19 pm CDT »
That's the site I gave him ^_^

In order to do that, you will need to use #if, which is complicated and requires admin level 4 (I guess you'll have 5 if your using your own server).  I don't think this is an appropriate place to discuss #if, so i'll try and catch you on AIM.
« Last Edit: December 31, 1969 06:00 pm CST by LastWish »

Hersh

  • Elvin Legion
  • *****
  • Posts: 413
  • Reputation: +0/-0
(No subject)
« Reply #3 on: October 10, 2003 06:00 pm CDT »
I remember how to do questie stuff, with onhear and if's, and those wonderful little blocks. 8)
If you need any help, PM, ICQ, or MSN me. If you only have AIM, PM me.

Hersh
« Last Edit: December 31, 1969 06:00 pm CST by Hersh »

I kissed a drunk girl on the lips.
This post, by its very length, defends itself against the risk of being read.

DeathAdder

  • Orc Thrasher
  • ***
  • Posts: 137
  • Reputation: +0/-0
    • http://www.los.planetubh.com
(No subject)
« Reply #4 on: October 24, 2003 12:51 pm CDT »
Back, with more help needed. well i know a whole bunch more now and i just ran into a problem... I need to know how to grab names and words from things ppl say. Like if i wanted a name extracted out of this sentence
hey so your names john, what do you need?

lets say you have no clue what name will be there but you want that name to be taken out and used as a variable like %name for later actions. I've been looking at other code that does that but its too spread out can't understand it. Please help
« Last Edit: December 31, 1969 06:00 pm CST by DeathAdder »
<img src="http://www.pcrpg.org/pics/hosted/dadder.jpg">

Silvanoshei

  • Centurian Lord
  • ********
  • Posts: 1,804
  • Reputation: +0/-0
(No subject)
« Reply #5 on: October 24, 2003 12:59 pm CDT »
That depends. Will the sentence always be the same? For example:

"hey so your names john, what do you need?"
"hey so your names jane, what do you need?"
"hey so your names fred, what do you need?"
"hey so your names sally, what do you need?"
"hey so your names sue, what do you need?"

Or are you expecting to be able to pick any name out of any sentence? If the latter, good luck with the project that will take you many years.
« Last Edit: December 31, 1969 06:00 pm CST by Silvanoshei »

The DoDoDo.

Your opinion is worthless unless you can support it.
We are not responsible for your stupidity.
I don't take sides. I take action.

Currently Playing:  Warcraft III [PC]

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #6 on: October 24, 2003 02:08 pm CDT »
Its a pain in the ass to perfect..

Don't waste your time, it isn't really worth it.
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

DeathAdder

  • Orc Thrasher
  • ***
  • Posts: 137
  • Reputation: +0/-0
    • http://www.los.planetubh.com
(No subject)
« Reply #7 on: October 24, 2003 02:45 pm CDT »
Ya it is going to be the same sentence, i know its something small that will grab the next word in a sentece so thats why i'm not giving up. You guys must know.. I learn fast too. ^_^
« Last Edit: December 31, 1969 06:00 pm CST by DeathAdder »
<img src="http://www.pcrpg.org/pics/hosted/dadder.jpg">

DeathAdder

  • Orc Thrasher
  • ***
  • Posts: 137
  • Reputation: +0/-0
    • http://www.los.planetubh.com
(No subject)
« Reply #8 on: October 29, 2003 05:01 pm CST »
Sigh, I'm trying to make a reserect spell i know how to get it to work just only thing i can't do is get the game to spawn a damn bot, I got it to the point where he spawns with the right race, name and location just i can't get the loadout to work. i want him to be like lvl 5 with a broadsword, yet nothing i've tried will work. so far up to now i have this
Code: [Select]
function test()
{
%newName = "Sloth";
%displayName = "MyTest";
%aiSpawnPos = "-2377.67 -274.017 65.0941";
%commandIssuer = "TempSpawn";
%loadout = "Test EXP 4000 ITEM broadsword 1";
%stuff = "broadsword 1";
SpawnAI(%newName, %displayName, %aiSpawnPos, %commandIssuer, %loadout);
givethisstuff(%displayName, %stuff, True);
// storeData(%displayName, "EXP", "4000", "inc");//I also played with this.
HardcodeAIskills(%displayName);
}

I relly don't think that loadout is the right way but i can't seem to figure it out i've looked in so many scripts for the way its done in admin commands but it won't help>_<.
So getting the damn thing to have EXP, LCK, weapons and stuff is my only problem. i can also call the command to make him use his weapon on spawn so don't worry about that. Once i have the loadout done i'm set. Unless someone knows how to get bots to help give a target player EXP when they do damage ^_^ 0: ) heh don't think thats possible but hey worth asking about. Thanx ppl
« Last Edit: December 31, 1969 06:00 pm CST by DeathAdder »
<img src="http://www.pcrpg.org/pics/hosted/dadder.jpg">

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #9 on: October 30, 2003 06:11 pm CST »
You use LVL not EXP for spawning bots like this.

Also get rid of the word "ITEM".
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

DeathAdder

  • Orc Thrasher
  • ***
  • Posts: 137
  • Reputation: +0/-0
    • http://www.los.planetubh.com
(No subject)
« Reply #10 on: November 1, 2003 12:57 am CST »
I must be missing something cause that didn't work. I tried
Code: [Select]
SpawnAI("Sloth", "TestBot", "the loc worked", "TempSpawn", "Test LVL 50 broadsword 1");

it all worked but the loadout i tried some other variations but none worked.... Something is wrong here. if at all possible could you tell me the syntax to use for setting lvl, lck and items.? Please and thanx
« Last Edit: December 31, 1969 06:00 pm CST by DeathAdder »
<img src="http://www.pcrpg.org/pics/hosted/dadder.jpg">

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #11 on: November 1, 2003 12:03 pm CST »
Drop "Test" in the loadout string.
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

DeathAdder

  • Orc Thrasher
  • ***
  • Posts: 137
  • Reputation: +0/-0
    • http://www.los.planetubh.com
(No subject)
« Reply #12 on: November 1, 2003 12:22 pm CST »
Ok i tried that and many other ways yet it won't work. this is what i tried the latest
Code: [Select]
function test()
{
%newName = "Sloth";
%displayName = "MyTest";
%aiSpawnPos = "-2377.67 -274.017 65.0941";
%commandIssuer = "TempSpawn";
%loadout = "LVL 50";
SpawnAI(%newName, %displayName, %aiSpawnPos, %commandIssuer, %loadout);
}

and he still wouldn't spwan with a lvl other than -1. Somethings wrong here. Give me an example of a loadout.
« Last Edit: December 31, 1969 06:00 pm CST by DeathAdder »
<img src="http://www.pcrpg.org/pics/hosted/dadder.jpg">

Darwin

  • Centurian Lord
  • ********
  • Posts: 6,466
  • Reputation: +0/-0
    • http://www.mierda54.tripod.com
(No subject)
« Reply #13 on: November 1, 2003 10:47 pm CST »
From eViL

Code: [Select]
Working Loadout: CLASS Paladin LVL 1050 LCK 3 TEAM 4 BroadSword 1  

Darwin is god


/end eViL
« Last Edit: December 31, 1969 06:00 pm CST by Darwin »



Susan

  • Goblin Pup
  • *
  • Posts: 13
  • Reputation: +0/-0
(No subject)
« Reply #14 on: November 2, 2003 10:35 am CST »
Your problem isn't in your code per se, it is in how the functions you are calling work.
For instance, SpawnAI calls AI::setWeapons toward the bottom.
AI::setWeapons is where your loadout actually gets processed, and is also where your problem is.
Code: [Select]
if(%loadout == -1 || %loadout == "" || String::ICompare(%loadout, "default") == 0)
{
%items = $BotInfo[%aiName, ITEMS];
if(%items == "")
GiveThisStuff(%aiId, $BotEquipment[clipTrailingNumbers(%aiName)], False);
else
GiveThisStuff(%aiId, %items, False);
}
else
GiveThisStuff(%aiId, $LoadOut[%loadout], False);


 This is a snipet from the function AI::setWeapons. Notice that your loadout doesn't fit the if statement. Since it is not blank, it is defined, and it does not = default, it passes to the else statement.
Since you have no $LoadOut[%loadout] defined, your critter shows as a -1 with nothing in its inventory.
There are a couple of ways around this, 1) spawn it then use the GiveThisStuff Function on your own; 2) Define $LoadOut[%loadout], and see if it accepts that; 3) Set %loadout = to "" and use the $BotInfo[%aiName, ITEMS] variable to define what it has.

Your best bet is to always track the functions that you are going to use, and see what they are doing.

If this is completely wrong, or I am wrong, then open AI.cs and figure it out on your own.
« Last Edit: December 31, 1969 06:00 pm CST by Susan »