can someone post a good trading script?
like:
A player wants to buy a pistol from a pirate for 5 golden nuggets?
A player wants to sell a pirate 10branches for 10bullets ?
(thanks for code tags,didn't notice it :P)
this is what i have tried:
More
YES THIS IS GOING TO BE A MESS:
in game editor line on unit script:
in game editor line on unit script:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
on:use { dialogue "PirateStart" "maps/TheIsland/Pirate.txt" } now the following lines are in maps/theisland/pirate.txt :) //~piratedialogue page=PirateStart title=Pirate text=start Hiello thaar! I em THE SEVEEN SEEAS PIRRET! text=end button=H1,How are you? button=Buy,Yeaaah...Maybe you have something to sell? button=Sell,Ok...Maybe you want to buy something from me? button=action:close,Um..uh..I've changed my mind.Bye! page=sell title=Pirate text=start No way man,I already have lots of goodies in my invisible ship! text=end button=buy,Goodies?Show them to me. button=action:close,Ok then...bye! page=h1 title=Pirate text=start Urgh,pretty good,but I would feel better- if you buy something from me! button=Buy,Errr...maybe.Show me what you have there. buton=action:close,No,I prefer you to feel bad. page=Buy title=Pirate text=start I've explored allll teh SEVEN SEAS and found lots of gooodiez! Wut do you want tu buy? text=end button=Pistol,I need a tool to kill something from a distance. button=Bullet,Pistol doesn't shoot! button=Wine,Got some wine? button=Map,Is that a map? page=Pistol title=Pirate Script=start if (playergotitem(4)>= [5]) { freestored "unit",1,4,5; $id=create("item",58); store $id,"unit",1; clear; add "Here you go,this is a Pistol.Click the trigger to shoot."; msg_extend; }else{ clear; add "I can't sell it to you!"; add "You must have atleast 5 goldnuggets for pistol!"; msg_extend; } script_end button=buy,Thank you,I want to see what you have more. button=action:close,Thanks for this,bye! page=Bullet title=Pirate Script=start if (playergotitem(4)>= [1]) { freestored "unit",1,4,1; $id=create("item",29); store $id,"unit",1; clear; add "Here,just put it into the pistol holes!"; msg_extend; }else{ clear; add "I can't sell it to you!"; add "You need a goldnugget for bullets!"; msg_extend; } script_end button=buy,Thank you,I want to see what you have more. button=action:close,Thanks for this,bye! page=wine title=Pirate Script=start if (playergotitem(4)>= [5]) { freestored "unit",1,4,5; $id=create("item",39); store $id,"unit",1; clear; add "Drink it for magical effect."; msg_extend; }else{ clear; add "I can't sell it to you!"; add "You need at least 5 goldnuggets for it..."; msg_extend; } script_end button=buy,Thank you,I want to see what you have more. button=action:close,Thanks for this,bye! page=map title=Pirate Script=start if (playergotitem(4)>= [10]) { freestored "unit",1,4,10; $id=create("item",73); store $id,"unit",1; clear; add "Here you go,You'll never get lost"; msg_extend; }else{ clear; add "I can't sell it to you!"; add "You need at least 10 goldnuggets for it..."; msg_extend; } script_end button=buy,Thank you,I want to see what you have more. button=action:close,Thanks for this,bye!
EDIT: I solved it by myself,can someone delete this topic?
p.s. solution:
More
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//PirateDialog page=START title=Pirate text=start ARRRGH! Who are you?!?! text=end button=feel,How are you? button=One,I am a stranded person,who are you? button=action:close,A person who is running away now. page=feel title=Pirate text=start Pretty good,but I would feel better if you buy something from me! text=end button=buy,Show me what you have. button=sell,I would feel better too if YOU buy something from ME. button=action:close,I prefer you to feel worse.Bye,haha! page=one title=Pirate text=start I'm the Pirate of the Seven Seas! And I have something to offer for you! text=end button=Buy,What do you have to offer? button=Sell,I have something to offer for you too! button=action:close,I don't care.Leave your offers for yourself. page=buy title=Buy something from the Pirate. text=start I take Golden Nuggets as money! And here is what I have to offer!: text=end # Nugget -> Pistol trade=start sell=4,5 buy=58,1 trade=end # Nugget -> Bullet trade=start sell=4,1 buy=4,10 trade=end # Nugget -> Wine trade=start sell=4,5 buy=39,1 trade=end button=sell,I have something to offer too! button=action:close,Thanks,Bye! page=sell title=Sell something to the Pirate. text=start Well,here is what I need: text=end # Grapes -> GoldNugget trade=start sell=45,10 buy=4,1 trade=end # Pearl -> GoldNugget trade=start sell=108,1 buy=4,1 trade=end # Joint -> GoldNugget trade=start sell=91,1 buy=4,3 trade=end # Wool -> GoldNugget trade=start sell=48,15 buy=4,1 trade=end button=buy,I want to buy something now. button=action:close,Thanks,Bye!
edited 1×, last 15.07.13 04:46:42 pm