DtlTraders/denizen/support: Difference between revisions

From Citizens Wiki
(Created page with "== Introduction == As many of us knows '''Denizens''' are a major extension for Citizens 2.0, so it's obvious to add new Commands if there is an ability to do so :) So far I'...")
 
m (Dandielo moved page DtlTraders/denizen/commands to DtlTraders/denizen/support: Merged all denizen commands/tags/triggers into one page so it's easier to collect information and understand examples)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Introduction ==
== Denizen Support ==
As many of us knows '''Denizens''' are a major extension for Citizens 2.0, so it's obvious to add new Commands if there is an ability to do so :)


So far I've added only two commands to use '''Denizens''' with '''dtlTraders'''.
All denizen commands/tags/triggers requires latest denizen version.


  TRADER_TRANSACTION [START/CANCEL] (SELL/BUY)<br />
=== Commands reference ===
TRADER_PATTERN [SET/REMOVE] (PAT:pattern_name)


But with these two commands you can make already some interesting things :)
Incoming


== Description ==
===  Tags reference ===


=== Trader Transaction Command ===
Incoming
The first command is used to open the trade window ''(START)'', or to close it ''(CANCEL)''. It's needed to use this command to open the traders window, because if a NPC got bot traits ''(trader and denizen)'', the traders '''r.click''' trigger is unused, so a Denizen script is only able to open the traders window.


  TRADER_TRANSACTION [START/CANCEL] (SELL/BUY)<br />
=== Trigger/Actions reference ===


The '''SELL''' or '''BUY''' argument is needed when you are ''starting'' a transaction, it will then show first the buy or sell tab.
Incoming


=== Trader Pattern Command ===
=== Examples ===
This command can be used to change the traders prices and items in stock by using defined patterns.
TRADER_PATTERN [SET/REMOVE] (PAT:pattern_name)


I think both arguments are obvious. But to be sure, a trader can have only 1 pattern at the time, and the '''SET''' argument needs the '''PAT:''' argument.
Incoming


== Small Example ==
== Navigation ==
The trader has the ''old_prices'' pattern set.
{| class="wikitable" style="text-align: center; width: 500px"
 
|-
<pre>
! style="width: 100%; background-color:#ADD8E6" colspan="2" | '''DtlTraders'''
"Trade":
|-
  Type: Interact
| Configuration || <!--| [http://wiki.citizensnpcs.com/DtlTraders/config Configuration] -->| [http://wiki.citizensnpcs.com/DtlTraders/Commands Commands] | [http://wiki.citizensnpcs.com/DtlTraders/permissions Permissions] | [http://wiki.citizensnpcs.com/DtlTraders/locale Locale]
  Requirements:
|-
    Mode: None
| Usage || <!--| [http://wiki.citizensnpcs.com/DtlTraders/managing Managing] | [http://wiki.citizensnpcs.com/DtlTraders/trading Trading] | [http://wiki.citizensnpcs.com/DtlTraders/banking Banking] |--> [http://wiki.citizensnpcs.com/DtlTraders/patterns Patterns]
  Steps:
|-
    1:
| Types || <!--| [http://wiki.citizensnpcs.com/DtlTraders/traders Traders] | [http://wiki.citizensnpcs.com/DtlTraders/bankers Bankers] <!--| [http://wiki.citizensnpcs.com/DtlTraders/auctionhouse Auction House] | [http://wiki.citizensnpcs.com/DtlTraders/wallets Wallets]-->
      Click Trigger:
|-
        Script:
| Denizen Support || <!--| [http://wiki.citizensnpcs.com/DtlTraders/denizen/commands Commands] | [http://wiki.citizensnpcs.com/DtlTraders/denizen/triggers Triggers] -->
        - CHAT Wait, i will just sort my goods.
|}
        - WAIT 1
        - CHAT Here we go! Just look around I've got the best wood in this area!
        - TRADER_TRANSACTION START SELL
        - WAIT 4
        - CHAT Looks like my boos has changed the prices...
        - TRADER_PATTERN SET PAT:new_prices
        - WAIT 7
        - CHAT I was just joking...
        - TRADER_PATTERN SET PAT:old_prices
        - WAIT 4
        - CHAT Ohh... i need to go for a while see you later.
        - TRADER_TRANSACTION CANCEL
</pre>
 
So here you got a simple example how to make a transaction more dynamic, but however all messages said by the trader may be behind the inventory window, and without ITEM_BOUGHT and similar triggers it's still not so flexible, but we got still a lot of work :)
 
Btw if you close the window while the Script is running it will still run. So be aware!

Latest revision as of 22:56, 5 February 2013

Denizen Support

All denizen commands/tags/triggers requires latest denizen version.

Commands reference

Incoming

Tags reference

Incoming

Trigger/Actions reference

Incoming

Examples

Incoming

Navigation

DtlTraders
Configuration Commands | Permissions | Locale
Usage Patterns
Types
Denizen Support