BOXEY Posted November 24, 2021 Share Posted November 24, 2021 the skript has no errors but the var does not save the items code command saveinventory: trigger: set {_w} to player's world saveinventory(player, {_w}) command loadinventory: trigger: set {_w} to player's world loadinventory(player, {_w}) function saveinventory(p: player, world: world): send "%{_world}%" to {_p} loop {_p}'s inventory: add loop-value to {%{_world}%inventory::%{_p}%} send "%{%{_world}%inventory::%{_p}%}%" to {_p} function loadinventory(p: player, world: world): send "%{_world}%" to {_p} send "%{%{_world}%inventory::%{_p}%}%" to {_p} loop {%{_world}%inventory::%{_p}%}: give {_p} loop-value send "%loop-value%" to {_p} Link to comment Share on other sites More sharing options...
BOXEY Posted November 24, 2021 Author Share Posted November 24, 2021 42 minutes ago, BOXEY said: the skript has no errors but the var does not save the items code command saveinventory: trigger: set {_w} to player's world saveinventory(player, {_w}) command loadinventory: trigger: set {_w} to player's world loadinventory(player, {_w}) function saveinventory(p: player, world: world): send "%{_world}%" to {_p} loop {_p}'s inventory: add loop-value to {%{_world}%inventory::%{_p}%} send "%{%{_world}%inventory::%{_p}%}%" to {_p} function loadinventory(p: player, world: world): send "%{_world}%" to {_p} send "%{%{_world}%inventory::%{_p}%}%" to {_p} loop {%{_world}%inventory::%{_p}%}: give {_p} loop-value send "%loop-value%" to {_p} nvm i look at a old skript and fond the answer new code options: p: &3&lHorizon &8| &7 time: 1 minutes 30 seconds every {@time} in world "world": loop all players: make loop-player say "/saveinventory" on world change: clear player's inventory send " " and "{@p}World Changed" and "&7Last Inventory Loaded!" and " " to player make player say "/loadinventory" if player is in world "minihub": set player's gamemode to survival command saveinventory: trigger: set {_w} to player's world saveinventory(player, {_w}) command loadinventory: trigger: set {_w} to player's world loadinventory(player, {_w}) function saveinventory(p: player, world: world): send " " and "{@p}Inventory Saved" and " " to {_p} loop 36 times: set {inv.%{_p}%.%{_count}%.%{_world}%} to slot {_count} of {_p}'s inventory add 1 to {_count} function loadinventory(p: player, world: world): loop 36 times: set slot {_count} of {_p}'s inventory to {inv.%{_p}%.%{_count}%.%{_world}%} add 1 to {_count} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now