Create a free account to remove all ad content.

Author Topic:  Spawning items in others inventory  (Read 810 times)

0 Members and 1 Guest are viewing this topic.

SweatyTae

  • Jr. Member
  • *
  • Posts: 29
    • View Profile
  • Xbox: SweatyTae
Spawning items in others inventory
« on: February 09, 2016, 03:42:48 PM »
Hi guys does anybody know how to make a script so when somebody completes a challenge and pm me a code, I can spawn items in their inventory instead of going to them and giving them it manually? It would be much quicker and quite relevant

Zoidberg

  • Legendary Member
  • *
  • Posts: 1445
    • View Profile
  • Xbox: v Zoidberg v
  • Steam: v_Zoidberg_v
Re: Spawning items in others inventory
« Reply #1 on: February 09, 2016, 03:58:18 PM »
You can use the Inventory command:

Inventory [player] [add] [Item] [qty]

Then, use the "Run Script For Another Player" option to run the script for that player.


Rev Elevenclaw

  • Sr. Member
  • *
  • Posts: 372
    • View Profile
  • Xbox: Rev Elevenclaw
Re: Spawning items in others inventory
« Reply #2 on: February 12, 2016, 05:28:09 AM »
When completed the challenge make them click a button or something that does this script...

If
HasHistory [level x] [false]
Then
History [player] [level x]
Teleport [away from end of level]
Inventory [player|x,y,z] [add] [item] [qty]

I think it would be more useful to give the history upon a zone entry. Then remove it with a script block teleporter. Set the script up on the block to check for the history, to run a set of scripts of your choosing. That way you can make a multi-script file to execute upon passing the history check, and there will be no residual history on them. So they could go thru challenges more than once, unless that is your intention. I hope that made sense...
Focus determines reality...

Coolo9000

  • Jr. Member
  • *
  • Posts: 27
    • View Profile
  • Xbox: TBR Gho5t33z
  • Steam: ThEPWN3r311
Re: Spawning items in others inventory
« Reply #3 on: February 12, 2016, 06:01:49 PM »
If
HasHistory [level x] [false]
Then
History [player] [level x]
Teleport [away from end of level]
Inventory [player|x,y,z] [add] [item] [qty]
Then you could add something like

else
notify [You have already completed this challenge!] [local] [r,g,b]


Is that how the notify command goes? I am going off memory.

Rev Elevenclaw

  • Sr. Member
  • *
  • Posts: 372
    • View Profile
  • Xbox: Rev Elevenclaw
Re: Spawning items in others inventory
« Reply #4 on: February 12, 2016, 09:22:38 PM »
If
HasHistory [level x] [false]
Then
History [player] [level x]
Teleport [away from end of level]
Inventory [player|x,y,z] [add] [item] [qty]
Then you could add something like

else
notify [You have already completed this challenge!] [local] [r,g,b]


Is that how the notify command goes? I am going off memory.
Yep the notify is correct.
Focus determines reality...

scripts helper

  • Jr. Member
  • *
  • Posts: 97
  • don't drop that duh duh duh duhhhhh
    • View Profile
  • Xbox: z0mbiesponge
  • Steam: <3creppypasta<3
Re: Spawning items in others inventory
« Reply #5 on: February 15, 2016, 11:29:40 AM »
To do that just create a script to put something in the inventory and then put a button with a script block/run script on another player using that script

Coolo9000

  • Jr. Member
  • *
  • Posts: 27
    • View Profile
  • Xbox: TBR Gho5t33z
  • Steam: ThEPWN3r311
Re: Spawning items in others inventory
« Reply #6 on: February 21, 2016, 05:50:48 AM »


Quote from: Rev Elevenclaw on February 12, 2016, 20:22:38<blockquote>Yep the notify is correct.</blockquote>

Sweet, thats surprising though....