Scheer1988xyz Posted November 11, 2010 Share Posted November 11, 2010 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 capsevery 2 minutes. It would be realy nice if someone can help me. :) Link to comment Share on other sites More sharing options...
Aragron Posted November 11, 2010 Share Posted November 11, 2010 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 Link to comment Share on other sites More sharing options...
ObLars Posted November 11, 2010 Share Posted November 11, 2010 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 capsevery 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? Link to comment Share on other sites More sharing options...
Scheer1988xyz Posted November 11, 2010 Author Share Posted November 11, 2010 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. Link to comment Share on other sites More sharing options...
Interfer0 Posted November 11, 2010 Share Posted November 11, 2010 This script will come in very useful. Question though, if you sleep will it keep multiplying? Link to comment Share on other sites More sharing options...
Aragron Posted November 11, 2010 Share Posted November 11, 2010 I guess not.Need to use GetPCSleepHours.I will update the scipt soon. Edited: Here it isshort 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 Link to comment Share on other sites More sharing options...
Scheer1988xyz Posted November 11, 2010 Author Share Posted November 11, 2010 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 ? Link to comment Share on other sites More sharing options...
Aragron Posted November 11, 2010 Share Posted November 11, 2010 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 Link to comment Share on other sites More sharing options...
Scheer1988xyz Posted November 11, 2010 Author Share Posted November 11, 2010 nice nice nice i can save.because of a little ; ... o_O you are my new god :wub: Link to comment Share on other sites More sharing options...
Scheer1988xyz Posted November 12, 2010 Author Share Posted November 12, 2010 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. Link to comment Share on other sites More sharing options...
Recommended Posts