Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-08-2009, 05:53 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Trade System

A trading system using a GUI that I was working on last night.

Create a new weapon called "Trade System" and place what's in the text-document inside.
Both parties need the weapon to work correctly.

Chat "/trade [communityname]" to ask if [communityname] wants to trade (they have 20 seconds to respond).
Chat "/tradeaccept" to accept a requested trade.
Chat "/tradedecline" to decline a requested trade

There's not an "unaccept" function.
This works for all weapon NPCs besides player-hidden ones (starts with "-") and Trade System, Bow, Fireball, Nukeshot, Bomb, Joltbomb, and Superbomb. If you want to change that go to the addItem() function, find the GuiTextListCtrl, and add/remove others.
If you want to change this to another item system (MUDLib, SQLite, etc) or add to what can be traded, go to the addItem() function, find the GuiTextListCtrl, and load the items. Then also go to the server side of the script where cmd is donetrade and add/remove the items how you would normally. The same goes for currency, except the function is addGralat().
Attached Thumbnails
Click image for larger version

Name:	pic1.JPG
Views:	433
Size:	34.5 KB
ID:	49803   Click image for larger version

Name:	pic4.JPG
Views:	346
Size:	6.0 KB
ID:	49809   Click image for larger version

Name:	pic2.JPG
Views:	357
Size:	38.1 KB
ID:	49808   Click image for larger version

Name:	pic3.JPG
Views:	357
Size:	42.9 KB
ID:	49807  
Attached Files
File Type: txt tradesystem.txt (26.6 KB, 450 views)
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.

Last edited by Switch; 11-08-2009 at 09:04 PM.. Reason: info for changing, pics, and update
Reply With Quote
 


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 04:35 PM.


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