• ✨ ARCHIVE MODE ✨
    The forum has now been set to read-only mode, no new posts, resources, replies etc will not be possible.
    We recommend you join our Discord server to get real-time response: Discord Invite Link

Script 2's Confusion

Shou Liengod

Active Member
Trusted Support
starting out from a year ago, i learned everything about the Old Scripts. now that it isnt being used anymore, and also the fact that some arnt working such as the wearskin command (have no idea how to revert back to default skin) i started to use the New Scripts, and looking into examples from both In-Game Files and Wiki,
Script 2 is darn confusing. heres a example i tried to do, but will not work at all.

when i tried to use this example script, it wont activate few commands.
such as the following

1: -@Text.show(ABCD)- whould just crash the game while -@Text(ABCD) would not but no Text are shown (even after looking up examples, they just wont execute)
2: -@Player.skin- wont work, using the command to return to default Skin

everthing else works fine just those two arnt. and its quite frustrating.

version=2

:if:<register.registered(Example)>=true
:then
@battle.trainer(Example)
@Music:confused:top
@Text(ABCD)
@Pokemon.clear
@Screen.fadeout
@Wait.200
@Sound.play(\cries\#)
@Player.skin
@Screen.fadeout
@Player.warp(Example.dat,#,#,#,#)
@Screen.fadein
@Music.play(Example)

:endif

:end


Edit: the <playername> crashes the game
 

Darkfire

Administrator
Administrator
P3D Developer
okay so there are two types of scripts
constructs and commands
constructs are always <construct.subconstruct()> and commands are @command.subcommand()
constucts can be used to get a value and can be used basically anywhere EXCEPT by themselves
<player.name> will return the player's name
<player.skin> will return the current skin
constructs can be used as paramaters for other constructs, commands, npc text, sign text, anywhere in a trainer file, etc

@pokemon.cry(##) does the cry of the given pokemon

if you want to change the player's skin and then revert back later you need to store the old skin
there are two ways to do this
@storage.set(string,playerskin,<player.skin>)
this will be temporary and the storage will be forgotten if the player leaves the game
@register.register(playerskin,str,<player.skin>)
this will save the given value in the register file and wont be removed unless you tell it to be removed
you can then use it later:
@player.wearskin(<storage.get(str,playerskin)>)
or
@player.wearskin(<register.value(playerskin)>)

This is almost complete documentation
http://pokemon3d.net/wiki/index.php?title=Version_2_Scripts
there is a new wiki page someone is working on + a tool nilllzz is making + the @help command in-game
in a sandbox-mode save the you can use commands in the chat window(press t)
so there you can type things like a warp command, etc to get around
you can also type @help(command or construct) to get details on how to use it
 
Top