alisgames
Junior Member
Old School Member
RealmCrafter CCE Programmer and 1.26 Programmer.
Posts: 58
|
Post by alisgames on Aug 20, 2018 6:39:59 GMT
Hi, I'm looking for a smiple script that will alow npcs to give out items free, and whats the best way to add items to character when the first start the game. Thanks Guys
|
|
strago
New Member
Doing tutorial videos on my youtube check them out and subscribe
Posts: 38
|
Post by strago on Aug 22, 2018 1:45:47 GMT
Function Main()
GiveItem(Actor(), "Forge Hammer", 1) GiveItem(Actor(), "questionmark", 1) GiveItem(Actor(), "Razor Mace", 2) GiveItem(Actor(), "Leather Shirt", 1) GiveItem(Actor(), "Odd Mushroom", 4) GiveItem(Actor(), "Beer", 11) SetName(Actor(), "Thoreg") Return()
End Function When you set your npc put this as the spawn script the items will be given on start up but if you want it to only happen once per player you need to have a first time login check
|
|
alisgames
Junior Member
Old School Member
RealmCrafter CCE Programmer and 1.26 Programmer.
Posts: 58
|
Post by alisgames on Aug 22, 2018 17:20:19 GMT
Ok sorry about that I fogot how to script because I'm so used to source code editing, but thanks for your help this is my finsh script and works well Thank you strago Using "RC_Core.rcm" ; Default player login script ; You may alter this script however you like ; The entry function for this script is always "Main" ; There is no context actor for this script Function Main() Player% = Actor() Result% = ActorXP(Player) If Result = 0 then GiveItem(Actor(), "army sword", 1) GiveItem(Actor(), "Basic Healing Potion", 5) GiveXP(Player, 2) EndIf Return End Function
|
|
strago
New Member
Doing tutorial videos on my youtube check them out and subscribe
Posts: 38
|
Post by strago on Aug 23, 2018 3:02:53 GMT
Not a problem im still working on scripts and Mystic Kingdoms but there is still some stuff id love added to rc
|
|
alisgames
Junior Member
Old School Member
RealmCrafter CCE Programmer and 1.26 Programmer.
Posts: 58
|
Post by alisgames on Aug 23, 2018 3:19:26 GMT
What would you like to be added to the source?
|
|
strago
New Member
Doing tutorial videos on my youtube check them out and subscribe
Posts: 38
|
Post by strago on Aug 24, 2018 15:45:55 GMT
yes
|
|