Knowledgebase
Storm Palace Hosting > Storm Hosting Help Desk > Knowledgebase

Ask a question:


Prop Generator w/ Refresh Script

Solution Prop Generator with Refresh Script

;by Foxy



First, the script and where to put it:

;Door id 1 Reset Button
ON SELECT { cpr GLOBAL prar GLOBAL
prar EXEC proparray =
0 cpr =
proparray cpr GET SETPROPS
"Avatar 1/" proparray LENGTH ITOA + LOGMSG
}

;Door id 2 Next Button
ON SELECT{
cpr GLOBAL
prar GLOBAL
prar EXEC proparray =
cpr ++
{ 0 cpr = } cpr proparray LENGTH == IF
proparray cpr GET SETPROPS
"Avatar " cpr 1 + ITOA + "/" + proparray LENGTH ITOA + LOGMSG
}

;Door id 3 Back Button
ON SELECT {
cpr GLOBAL
prar GLOBAL
prar EXEC proparray =
cpr --
{ proparray LENGTH 1 - cpr = } cpr -1 <= IF
proparray cpr GET SETPROPS
"Avatar " cpr 1 + ITOA + "/" + proparray LENGTH ITOA + LOGMSG
}

;Door id 4 Stick in a corner somewhere
;when you add avs, you have to leave and re-enter to see them
ON ENTER { prar GLOBAL cpr GLOBAL -1 cpr =
{ [
[ 987845363 987845372 987845379 987845385 987845393 987845400 ]
[ 987883375 987883382 987883390 987883397 987883414 987883423 ]
;add avatar lines here
] } prar DEF }

That is just the prop generator script above. Now we need to add the Refresh Option to the room AND to the other proprooms.

;Door id 5 Refresh Option. Stick in a corner
;this part should go in all of the prop rooms that use this generator
ON ENTER { crrp GLOBAL crp GLOBAL
{ 0 crp = 1 ME SETALARM
"Refreshing " ROOMNAME + LOGMSG
} crrp ISWIZARD AND IF
}
ON ALARM { prar GLOBAL crp GLOBAL rrp GLOBAL crrp GLOBAL
prar EXEC proparray =
proparray crp GET SETPROPS
crp ++ crp ITOA "/" proparray LENGTH ITOA + + LOGMSG
{ 180 ME SETALARM }
{ crrp ++ { 0 crrp = } crrp rrp EXEC LENGTH == IF
rrp EXEC crrp GET GOTOROOM
} crp proparray LENGTH < IFELSE
}

;this part goes in the "FIRST" room of your multiple rooms for the refresh
;This can be added with the rest of the refresh script above in the same door
;I separated it here so you would know that it ONLY goes in the first room of proprooms.
ON OUTCHAT { rrp GLOBAL crp GLOBAL crrp GLOBAL
{ { [ 129 134 ] ;room ids to refresh, in order
} rrp DEF 0 crp = "" CHATSTR =
0 crrp = "Refreshing " ROOMNAME + LOGMSG 1 ME SETALARM
} CHATSTR "Refresh all" == ISWIZARD AND IF
}
;say 'refresh all' to automatically go through all of the rooms in your array

Ok now to explain how to use it once you set it up in ALL the proprooms just like it says above. The ON ENTER and ON ALARM handlers of the Refresh Option go in ALL the proprooms, but the ON OUTCHAT only goes in the FIRST proproom where you will start the cycling through of your props.

Once you have this all installed and prop id numbers added, you need to tell the refresh script WHICH rooms you want to cycle through. There is a line in the last script that goes in the first room ONLY that looks like this....

{ { [ 129 134 ] ;room ids to refresh, in order

129 and 134 are room id numbers. Add the room id numbers to all of the proprooms you want refreshed into that array. If you have 25 proprooms, then there should be 25 room id numbers in that array.

Now, you need to go load an empty propbag so you force the server to show you what it has in memory and your client isnt showing you the props. Turn flood off in the server while you do this just to be safe by typing 'flood off. (Ive killed myself before. LOL) Stand in the first room where that last part of the refresh script was installed and say "Refresh all"

You will start cycling through that generator and when you are done, you will be moved to the next room in the array of room id numbers that you entered into the script where you will continue cycling through those props and continue on like this until its done and dumps you back into the room you began in.

Once you start this script, you can go eat or shower or whatever while it does its thing OR you can watch to make sure all the props are seen and remembered by the server. If you cant see some of the props, neither can anyone else and those props need to be re edited and re added to the script.

You can also use this option to go get your server bag, stand in the first room and say refresh all to "show" the server the props in case its forgotten some. Sometimes its not always a case that they need to be re edited. They may just need to be reshown to the server. You may even want to do that first. Wear your server propbag, type refresh all, show all the props to the server, go get an empty propbag, do the same thing and refresh them that way before you flush. That way if youve not shown and flushed the proper way up until now, you will have your bases covered and KNOW that they were just shown and if you still cant see them with an empty bag, you will know for sure, they need to be re edited and re added to the script.

Thats it! Once the script is installed, you can just dupe the room and change the prop id numbers. This will end the clicking the next button over and over to do it manually. It makes prop upkeep a breeze. :-)
 
Was this article helpful? yes / no
Article details
Article ID: 31
Category: Room Scripts
Date added: 04-02-2011 12:39:53
Views: 1937
Rating (Votes): Article rated 5.0/5.0 (1)

 
<< Go back

Powered by Help Desk Software HESK™