Page 1 of 4
Discussion on making this possbile.
Posted: March 31st, 2010, 5:06 pm
by GR1M
While i was thinking about shops in Sandbox, i thought about why not have the ability to trade items with one another?. Lets have a discussion on how to make this possible...Is it as easy as a character creating a trigger and another character accepting it?
Gr1m

Re: Discussion on making this possbile.
Posted: March 31st, 2010, 7:11 pm
by arcones
Hey, great idea! I'm pretty sure the Village RPG has something like that.
You give that cave dude some cake. It would be similar to trading... or even selling. If you could make it so that you could sell apples or pies. I think it would be relatively easy!!
Re: Discussion on making this possbile.
Posted: March 31st, 2010, 10:23 pm
by GR1M
The problem is that was a npc, i don't know if a live person online would be any different are harder?
Gr1m

Re: Discussion on making this possbile.
Posted: April 1st, 2010, 8:48 am
by arcones
I dunno... I would think that because it's a live person, and not an NPC that has been coded in, it wouldn't work...
Also, with the coding, the live person can sell to NPC's. But seeing as other live ppl, aren't NPC's, it might not work...
We could ask Venima to chime in on this!
Re: Discussion on making this possbile.
Posted: April 1st, 2010, 10:16 am
by Venima
somebody call?
The issue with having two live people playing is, how would you get them to trade in the first place, e.g. would it be when one player moves to another and presses a key, the other accepts the trade request and up pops a menu? This needs to be coded in.
The other issue is you'd need to create some code to view the other player's inventory, or part of it. This requires editing some of the core coding for rpg mode.
If you don't want to edit the core code, scripting gets very very complex and involves reems and reems of "if"s in a gui window for each type of item in the world. You also need to create a variable per player for every item in the world e.g. "apples_player1 = 0, apples_player2 = 0" etc.
lol
Re: Discussion on making this possbile.
Posted: April 1st, 2010, 10:19 am
by arcones
I guessed it would be something like that... Not to mention hard
But I think it would be possible to trade w/ an NPC. Maybe?
Re: Discussion on making this possbile.
Posted: April 1st, 2010, 10:32 am
by Venima
Oh yes, easy as pie with an npc
Re: Discussion on making this possbile.
Posted: April 1st, 2010, 12:29 pm
by Leo_V117
The NPC Trade function can be used for players you know?
Add this:
Code: Select all
spawn_blacksmith = [
r_additem armor
r_additem helmet
r_additem boots
r_additem leg_guards
r_additem shield
r_model "rpg/characters/mman"
r_name "Blacksmith"
r_interact [
r_select $rpginteract
r_talk $rpgself 0
]
r_say "Hello there friend. How can I help you today?" [ //0
r_response "What have you got in stock?" -2
r_response "Nevermind, Bye" -1
]
]
Then modify it to be this:
Code: Select all
spawn_tradestation = [
r_additem <item name>
r_additem <item name>
r_additem <item name>
r_additem <item name>
r_additem <item name>
r_model "dfs/terminal"
r_name "Trade Station"
r_interact [
r_select $rpginteract
r_talk $rpgself 0
]
r_say "Trade Items." [ //0
r_response "Trade" -2
r_response "Close" -1
]
]
There we go.
and as for the model:
http://www.sendspace.com/file/2n8q7p
Re: Discussion on making this possbile.
Posted: April 1st, 2010, 12:59 pm
by Venima
Yeah you missed something though, it's all very well adding items to the tradestation but, how do you know what each player owns? And another thing, that will spawn a "trade station". So in effect they won't be trading with each other, they'd be trading with the station. However, I suppose having an NPC between them would actually work...but they wouldn't be able to make direct trades which can be important sometimes.
If you get me...
Re: Discussion on making this possbile.
Posted: April 1st, 2010, 1:26 pm
by arcones
I get you...
