Map Database  •  FAQ  •  RSS  •  Login

RC3 Infinite resources Tutorial (stone, coal, iron, gold)

<<

Michalpl

Sword Fighter

Posts: 318

Joined: 10 May 2014, 21:46

KaM Skill Level: Fair

Post 30 Sep 2014, 15:07

RC3 Infinite resources Tutorial (stone, coal, iron, gold)

First of all we need to make basics of our script so need this
procedure onTick;
begin

Next step is to decide what time of resource we want to be infinite
Resource|id
full stone 132 exhausted 0
full coal 155 exhausted 36
full iron 151 exhausted 148 not fully because we want to make sure the tile will be the same
full gold 147 exhausted 144 -#-

Next step is going to setup it so we need to pick a place for it (get X and Y cords)
if you have the cords you can now script it

if States.MapTileType(X,Y) = id of the exhausted ore for example 148 is the iron one.
Use here (then begin) without ()

Next step is to make it change tile back to the full ore

Actions.MapTileSet(X,Y,id for the full ore for this example is 148 iron,0); you can ignore changing 0 because its tile rotation not needed
Use two times (end;) without () in each under line on the end of our script

Last step is to finish our script code it structure should look like this (iron example)

procedure onTick;
begin
if States.MapTileType(132,143) = 148
then begin
Actions.MapTileSet(132,143,151,0);
end;
end;

And you're done hope that helped you making scripted maps that have infinite resources
<<

tno1

Peasant

Posts: 4

Joined: 30 Jul 2015, 16:38

KaM Skill Level: Average

Post 30 Jul 2015, 16:40

Re: RC3 Infinite resources Tutorial (stone, coal, iron, gold

Hey thanks for this, now I am trying to also make fishing infinite :p any clue how I can spawn fish? :p as atm I tried the Action.GiveAnimal(25,90,6)and it doesnt spawn anything at all :/ Any thoughts? :p

Return to “Dynamic Scripting”

Who is online

Users browsing this forum: No registered users and 6 guests