Forum

> > Stranded II > Scripts > Scripting Questions
Forums overviewStranded II overview Scripts overviewLog in to reply

English Scripting Questions

2,429 replies
Page
To the start Previous 1 2104 105 106121 122 Next To the start

old Re: Scripting Questions

Someone Evil
User Off Offline

Quote
1: Radius should/must be over 0
2: Wait a day (while testing map press F11, that will run the sourcecommand change day and should spawn monkeys, if once doesent work try hitting several times, then more days will pass)

old Re: Scripting Questions

_Omnipotent_
User Off Offline

Quote
Can some one fix this for me i would be very greatful:

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
### Meat
id=9
name=Meat
group=food
icon=gfx\meat.bmp
model=gfx\meat.b3d
scale=0.15
mat=flesh
weight=500
info=a juicy piece of raw meat. I can fry it, eat it as it is or take it in my hand and throw it at wild animals...
behaviour=throw
damage=0
speed=15
drag=1.8
rate=3000
script=start
	//Fry!
	on:use {
		if ((count_inrange("state",5,50)+count_inrange("state",4,50))>0){
		$tmp=skillvalue("cook");
		$tmp2=random(1,10);
		if ($tmp > 9 & $tmp < 25){
		if($tmp2 > 8){
			process "frying",500;
			fry;
			alteritem 1,10;
		}else{
		if ((count_inrange("state",5,50)+count_inrange("state",4,50))>0){
		if ($tmp > 25 & $tmp < 50){
		if($tmp2 > 7){
			process "frying",500;
			fry;
			alteritem 1,10;
		}else{
		if ((count_inrange("state",5,50)+count_inrange("state",4,50))>0){
		if ($tmp > 50 & $tmp < 100){
		if($tmp2 > 6){
			process "frying",500;
			fry;
			alteritem 1,10;
		}else{
		if ((count_inrange("state",5,50)+count_inrange("state",4,50))>0){
		if ($tmp > 100 & $tmp < 250){
		if($tmp2 > 5){
			process "frying",500;
			fry;
			alteritem 1,10;
		}else{
			process "frying",300;
			fry;
			msg "i burned the food",3;
			speech "negative";
			alteritem 1,4985;
		}else{
			msg "I need fire to fry this!",3;
			speech "negative";
}
}
}
}
}
}
}
}
}
}
}
}
}
	//Eat
	on:eat {
		process "eating",1000;
		eat 5,20,10,0;
	}
	//Taming
	on:drop {
		ai_behavioursignal "eat","raptor",300;
		ai_behavioursignal "eat","predatorfish",300;
	}
	on:ai_eat {
		local $eater,$var;
		$eater=ai_eater();
		if (type("unit",$eater)==2){
			$var=getlocal("unit",$eater,"tameness");
			$var+=2;
			setlocal "unit",$eater,"tameness",$var;
			if (($var>9)&&(gotstate("unit",$eater,"tame")==0)){
				addstate "unit",$eater,"tame";
				corona getx("unit",$eater),getz("unit",$eater),20,255,70,100;
				msg "I tamed it!",4;
			}
		}
	}
script=end

old Re: Scripting Questions

Someone Evil
User Off Offline

Quote
on:nextmap {
loadmap "MAPPATH",param1,param2,param3,param4;
}
param1=Keep Skills (1/0)
param2=Keep Inventory Items (1/0)
param3=Keep Player and Global variabels (1/0)
param4=Keep dairy entrys (1/0)

All parameteres (1,2,3,4) are optional and by default 0

old Re: Scripting Questions

Hurri04
Super User Off Offline

Quote
@ Somoene Evil:
you forgot 2 parameters:
param5=keep states (1/0)
param6=keep buildlocks (1/0)

so the full code you (RazorBlade9) have to write into the object might be
1
2
3
on:use{
	loadmap "[MAPPATH]\[MAPNAME].s2", 1, 1, 1, 1, 1, 1;
}

[MAPPATH] = "maps" (normal map file, no quotes!)
[MAPNAME] = "my_map" (examplename, no quotes!)

old Re: Scripting Questions

amstel bier9
User Off Offline

Quote
Hurri04 has written
@ Somoene Evil:
you forgot 2 parameters:
param5=keep states (1/0)
param6=keep buildlocks (1/0)

so the full code you (RazorBlade9) have to write into the object might be
1
2
3
on:use{
	loadmap "[MAPPATH]\[MAPNAME].s2", 1, 1, 1, 1, 1, 1;
}

[MAPPATH] = "maps" (normal map file, no quotes!)
[MAPNAME] = "my_map" (examplename, no quotes!)


on:use {
loadmap "Maps\mymap.s2"[,1][,1][,1][,1][,1][,1][,1]
}

old Re: Scripting Questions

Solve
User Off Offline

Quote
If i use the shotgun and when i have used it i want to every second shot relode it by pressing right mouse botton, then a process bar "realoding" for a sec then 2 shots and then you can shoot again.

plz help me!

edit:Can i change the buttons in the main menu, so instead of adventure it says zombie or something..

edit2: Something is wrong whit this script, when i enter sell page ingame it says: invalid dialogue trade property 'sell'

plz help me

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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
page=sell
title=Trade with pirate
# Wine -> Gold
trade=start
sell=39,1
buy=5,45
trade=end
# Pearl -> Gold
trade=start
sell=108,1
buy=5,10
trade=end
# Goldnugget -> Gold
trade=start
sell=4,1
buy=5,45
trade=end
# small Crystal -> Gold
trade=start
sell=2,1
buy=5,45
trade=end
# Crystal -> Gold
trade=start
sell=3,1
buy=5,50
trade=end
# Pistol -> Gold
trade=start
sell=58,1
buy=5,20
trade=end
# Shotgun -> Gold
trade=start
sell=110,1
buy=5,40
trade=end
# AK-47 -> Gold
trade=start
sell=127,1
buy=5,75
trade=end
# Bullet -> Gold
trade=start
sell=29,1
buy=5,2
trade=end
# Bullets -> Gold
trade=start
sell=29,20
buy=5,50
trade=end
# Bow -> Gold
trade=start
sell=59,1
buy=5,10
trade=end
# Arrow -> Gold
trade=start
sell=53,1
buy=5,3
trade=end
# Fire Arrow -> Gold
trade=start
sell=56,1
buy=5,7
trade=end
# Poisonous Arrow -> Gold
trade=start
sell=55,1
buy=5,7
trade=end
# Spear -> Gold
trade=start
sell=52,1
buy=5,5
trade=end
# Remote Trigger -> Gold
trade=start
sell=101,1
buy=5,50
trade=end
# Fishing rod -> Gold
trade=start
sell=50,1
buy=5,10
trade=end
# Branch -> Gold
trade=start
sell=24,5
buy=5,2
trade=end
# Iron -> Gold
trade=start
sell=85,1
buy=5,7
trade=end
# Trunk -> Gold
trade=start
sell=7,1
buy=5,5
trade=end
# Joint -> Gold
trade=start
sell=91,1
buy=5,6
trade=end
# Ironbolt -> Gold
trade=start
sell=63,5
buy=5,6
trade=end
# Bolt -> Gold
trade=start
sell=62,5
buy=5,4
trade=end
# Arbalest -> Gold
trade=start
sell=64,1
buy=5,30
trade=end
# Meat -> Gold
trade=start
Sell=10,1
buy=5,2
trade=end
# Small meat -> Gold
trade=start
sell=12,1
buy=5,1
trade=end
button=start,One more thing...
button=buy,Show me your goods!
button=action:close,I don't want anything!

page=buy
title=Trade with pirate
# Gold -> Bandage
trade=start
sell=5,5
buy=117,1
trade=end
# Gold -> Bullet
trade=start
sell=5,4
buy=29,1
trade=end
# Gold -> Bullets
trade=start
sell=5,60
buy=29,20
trade=end
# Gold -> Sword
trade=start
sell=5,20
buy=74,1
trade=end
# Gold -> Broadsword
trade=start
sell=5,40
buy=75,1
trade=end
# Gold -> Pistol
trade=start
sell=5,40
buy=58,1
trade=end
# Gold -> Shotgun
trade=start
sell=5,60
buy=110,1
trade=end
# Gold -> AK-47
trade=start
sell=5,80
buy=127,1
trade=end
# Gold -> Bow
trade=start
sell=5,20
buy=59,1
trade=end
# Gold -> Arrow
trade=start
sell=5,2
buy=53,1
trade=end
# Gold -> Poison Arrow
trade=start
sell=5,10
buy=55,1
trade=end
# Gold -> Fire Arrow
trade=start
sell=5,10
buy=56,1
trade=end
# Gold -> Spear
trade=start
sell=5,10
buy=52,1
trade=end
# Gold -> Explosive Bait
trade=start
sell=5,36
buy=100,1
trade=end
# Gold -> Remote Trigger
trade=start
sell=5,14
buy=101,1
trade=end
# Gold -> Rocket Launcher
trade=start
sell=5,100
buy=81,1
trade=end
# Gold -> Rocket
trade=start
sell=5,75
buy=79,1
trade=end
# Gold -> Food
trade=start
sell=5,4
buy=10,1
trade=end
# Gold -> Fishing rod
trade=start
sell=5,20
buy=50,1
trade=end
# Gold -> Fishing Bait
trade=start
sell=5,5
buy=119,50
trade=end
# Gold -> Iron
trade=start
sell=5,10
buy=85,1
trade=end
# Gold -> Branch
trade=start
sell=5,1
buy=24,1
trade=end
# Gold -> Stone
trade=start
sell=5,7
buy=23,1
trade=end
# Gold -> Log
trade=start
sell=5,10
buy=7,1
trade=end
# Gold -> Poisonous Fungus
trade=start
sell=5,5
buy=34,1
trade=end
# Gold -> Ironbolt
trade=start
sell=5,13
buy=63,5
trade=end
# Gold -> Bolt
trade=start
sell=5,11
buy=62,5
trade=end
# Gold -> Arbalest
trade=start
sell=5,50
buy=64,1
trade=end
button=start,One more thing!
button=sell,Yeah, I have some stuff to sell!
button=action:close,I don't want anything!
edited 8×, last 23.08.10 07:35:08 pm

old Re: Scripting Questions

lucas is stranded
User Off Offline

Quote
I have two questions... I'm not sure if they're completely dependent or related to scripting but here goes anyway...

1. On random generated maps, we always get a random NPC to trade with (pirate, villager etc...), but when I open a random map on the editor and place one of these NPCs I can't trade with them, I press E near them and nothing happens.

Am i suposed to put a NPC script for these NPCs? If that's the case where can I find this script? (if it's in the game it's gotta be somewhere in Stranded 2 folder... but where?).



2. Is there any way to remove the "ouch! He dropped me!" feature of the raptors? It feels that is nearly no reward for taming one...

old Re: Scripting Questions

Hurri04
Super User Off Offline

Quote
1. where you find the scripts:
Quote
[Stranded II File]/mods/Stranded II/sys/scripts/random_char_chieftain.s2s
                                                                      /random_char_hempguy.s2s
                                                                      /random_char_native.s2s
                                                                      /random_char_pirate.s2s
                                                                      /random_char_prof.s2s
                                                                      /random_charscript.s2s


2. you might try this:
after throwing 5 meat at the raptor (I think its 5) it says the raptor is tamed now but when riding him he will drop you quiete often.
solution: throw 5 more pieces of meat at him and he will be really tamed.


edit: changed the endings of the script files from .txt to .s2s
edited 1×, last 24.08.10 01:51:59 pm
To the start Previous 1 2104 105 106121 122 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview