Jump to content

Recommended Posts

Posted

Hello,

Im totally new in scripting and need help for my mod.

 

I search a script for a item that add, when its in my inventory, for example 100 caps

every 2 minutes.

 

It would be realy nice if someone can help me. :)

Posted

ok... you need to create a quest,check enabled from start,then create an quest script,attach it to the quest and you're done.

 

short Timer

begin gamemode
set Timer to Timer + getsecondspassed
if Timer >= 120 && player.getitemcount "youritemID" > 0 ;120 s = 2 min
player.additem Caps001 100 ;add 100 Caps
set Timer to 0 :Reset Timer
endif
end

Posted
  On 11/11/2010 at 7:35 PM, Scheer1988xyz said:

Hello,

Im totally new in scripting and need help for my mod.

 

I search a script for a item that add, when its in my inventory, for example 100 caps

every 2 minutes.

 

It would be realy nice if someone can help me. :)

 

That does sound a little like cheating. So why don't you just add a crap load of caps somewhere easely accessable?

Posted

thanks aragron i try it and hope it do what i wish.

 

@oblars i will not cheat.

do you know the game fable ? there you can buy houses/shops and earn money every 5 minutes.

i will try something like that.

my idea to realize this is, that you buy cards or somethink like that to get ownership.

When you are the owner of a shop you earn money.

Posted

I guess not.Need to use GetPCSleepHours.I will update the scipt soon.

 

Edited: Here it is

short Timer
short Math
short Stop
begin gamemode
set Timer to Timer + getsecondspassed
if Timer >= 120 && player.getitemcount "youritemID" > 0 ;120 s = 2 min
player.additem Caps001 100 ;add 100 Caps
set Timer to 0 :Reset Timer
set stop to 0
endif

if player.GetPCSleepHours > 0 && stop == 0 ; 1 hour = 60 min 60/2 = 30 30 x 100 = 3000 :1 hour = 3000 Caps
set Math to player.getPCSleepHours * 3000 ;Hours * Caps
player.additem Caps001 Math
set stop to 1 ;2 minutes to win money when sleeping again,prevents repetition
endif
end

Posted

big big thanks for your help but i cant save the script.

must i realy make a quest or can i add this script to an item, and when i have the item in my inventory i get the caps ?

Posted

You need to make a quest. Also,do you remembered to change "youritemID" to your item ID and put a ScriptName, right...?

Oh,found the error: the part

set Timer to 0 :Reset Timer

,there is a : instead of ;this should work

set Timer to 0 ;Reset Timer

Posted

im incapable to make a quest for that :sad:

is it possible to make it for an item/object?

my plan is to buy a item that do what is in this script, when i have this item in my inventory.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...