![]() |
Trading?
What would be the best way to go about making a trade item for a free server? I was trying to think how to do it and I figured...
1.Text File for each droppable NPC 2.Use PutNPC when fired 3.Find out how to make it destroy the item in the weapons list once dropped any help? |
help me please =(
|
Quote:
putnpc... in the putnpc do if playerthouch me destroy etc. |
I dont recommend using Putnpc .
b/c if 2 ppl touch it at the same time, they will both get the item. Its hard to make trading stuff for non p2p . I would use something like putnpc but making the players separated so they can not both touch the putnpc at the time |
Quote:
individual hat go everywhere. |
im sure there is a complicated script you could do with arrays
|
well, lets see
if (created) { this.playerid=-1; } if (playertouchsme&&this.playerid==-1) { this.playerid=playerid; if (this.playerid==playerid) { toweapons ....; } } |
Quote:
Because the this.playerid would be local. So if 2 people touched at the same time it would give this.playerid to both of them .. hehe .its a b*tch i know u can do w/ save[0] variables. but even those take a second or two to send to the server. So its not as ez as it looks to make these things on free |
Quote:
|
Quote:
|
Eye Dee Ah (Idea you *****s)
Make a trade house in which each player enters a secured area (blocking tiles with a door =P). When both players say 'start trade' the doors would close. Each player would lay the item and then when both say 'trade' or 'accept' they get switched from one 'trade box' to the other. Of course doing this with gralats wont be easy because they can disappear after a short time.. |
Quote:
|
I would put all of the NPCs that you use into seperate text files for the stuff. Put like a bank item in the trading house, then, if they say "trade <npchere> spot1" and the other person says "trade <npchere> spot2". Then, make it so they have to accept then have it destroy it in the players weapon list and use putnpc to put it in front of them. With the bank use something like "<ammounthere> for spot1" or vica versa. Then it drops the ammount into spot 1 or 2. It may be laggy, but, it should work. As for the trading item itself, it would be kind of hard, because, if the person "lagged" and someone else came by, they both would get it.
|
There is no way whatsoever to check and see if the npc was recieved in 2 parcels in 1 level on a non-p2p server? There has to be a way of checking for this.
|
hmmm the main problem is destroying it in the droppers weapons list
|
y dont you use this. in the weapon of the player like
if (this.traded=1){ destroy;} therefore it destroys the weapon |
Quote:
NPC Code: something like that? |
Quote:
|
Quote:
if (destroynpc) { destroy; } in the tradable npc's.. then have in the trader for (this.i=0;this.i<weaponscount;this.i++) { if (strequals(#w(this.i),Fireball)) { callweapon this.i,destroynpc; } } or something like that. (where fireball is the npc ur trading) |
| All times are GMT +2. The time now is 09:27 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.