Author Topic: Random Script  (Read 6137 times)

Offline Xen

  • Hero Member
  • *****
  • Posts: 524
  • Church Burner.
    • View Profile
Random Script
« on: September 23, 2004, 01:46:17 AM »
Ok, I know people are gonna request scripts, Or some are embarrased to. I'll make some scripts and just post em. Do not add comments this is not for that. Just scripts if You want to add comments add it at the base of your post AFTER your script.

Offline Xen

  • Hero Member
  • *****
  • Posts: 524
  • Church Burner.
    • View Profile
Random Script
« Reply #1 on: September 23, 2004, 01:56:01 AM »
//Basic Sit Script (Place OnUsed in an objects "Events" tab)[/span]
[span style=\'color:blue\']void[/span] main()
{
[span style=\'color:blue\']object[/span] oObject = [span style=\'color:blue\']OBJECT_SELF[/span];
[span style=\'color:blue\']object[/span] oUser = GetLatsUsedBy();

AssignCommand(oUser, ActionSit(oObject));
}

[span style=\'color:red\']Heres the basic sit script everyone keeps wanting.
« Last Edit: September 23, 2004, 01:58:36 AM by XenDestiny »

Offline Xen

  • Hero Member
  • *****
  • Posts: 524
  • Church Burner.
    • View Profile
Random Script
« Reply #2 on: September 23, 2004, 02:24:28 AM »
/*
Basic Conversation starter, You can use it werever you want. Lets say you put it OnUsed in a objects "Events" tag it will fire every tim ethat object is used
*/
[/span][span style=\'color:blue\']void[/span] StartConversation([span style=\'color:blue\']object[/span] oPC)
{
AssignCommand(oPC, ActionStartConversation(PC, "convo resref", [span style=\'color:blue\']TRUE[/span]));
}



[span style=\'color:red\']//Now, the command:[/span]

[span style=\'color:blue\']void[/span] main()
{
[span style=\'color:green\']// In this isntance we are going to use "OnUsed"[/span]
[span style=\'color:blue\']object
oUser = GetLastUsedBy();
StartConversation(oUser);
}

Offline Xen

  • Hero Member
  • *****
  • Posts: 524
  • Church Burner.
    • View Profile
Random Script
« Reply #3 on: September 23, 2004, 02:51:45 AM »
/*
Simple Animation que for placable objects, In this example we are making a Statue that Causes you to worship:
*/[/span]
[span style=\'color:blue\']void[/span] main()
{
[span style=\'color:blue\']object
oUser = GetLastUsedBy();

AssignCommand(oUser, ActionPlayAnimation(ANIMATION_LOOPING_WORSHIP,5.0);
}
« Last Edit: September 23, 2004, 02:59:49 AM by XenDestiny »

Offline 420

  • Hero Member
  • *****
  • Posts: 4087
    • View Profile
    • Email
Random Script
« Reply #4 on: September 23, 2004, 12:19:10 PM »
//Alternate script for an items OnUsed trigger event, will automatically use the conversation that is specified in the "conversation" field in an objects advanced menu

void main()
{
    object oPC = GetLastUsedBy();
    ActionStartConversation(oPC, "", TRUE, FALSE);
}


(The conversation started is private so as not to bug other players.)

-420

Offline 420

  • Hero Member
  • *****
  • Posts: 4087
    • View Profile
    • Email
Random Script
« Reply #5 on: September 23, 2004, 12:23:58 PM »
//Alternate sit script for a chair, checks to make sure no one is already sitting in the chair, goes in the OnUsed event trigger

void main()
{
object oChair = OBJECT_SELF;

  if(!GetIsObjectValid(GetSittingCreature(oChair)))
    {
    AssignCommand(GetLastUsedBy(), ActionSit(oChair));
    }
}