Aller au contenu

Photo

How to post scripts so they show up properly


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
UnrealJedi

UnrealJedi
  • Members
  • 113 messages
Can somebody show me how to post scripts so they show up neatly and not all jumbled together?


Thanks! 

#2
henesua

henesua
  • Members
  • 3 878 messages
 it is a painstaking process to get scripts to format properly on the forum.
Rather than waste your time with that, I suggest posting to pastebin (or a similar service) and linking to your paste.

#3
Squatting Monk

Squatting Monk
  • Members
  • 446 messages
virusman (I think?) has a pastebin clone that color codes for NWScript.

#4
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
I'm not sure why everyone has problems posting scripts. Just don't use the quick reply. Use the "...or use the standard form" next to the "Submit" button below. Then just copy and paste your script. That's all I do anyway. I'm using Firefox. Not sure if that makes a difference at all.

example (copy and pasted script):


void main()
{
    // Get the creature who triggered this event.
    object oPC = GetEnteringObject();
    effect eVFX;
    effect eDamage;
    string sTag = GetTag(GetItemInSlot(INVENTORY_SLOT_CHEST, oPC));
    // Only fire for (real) PCs.
    if ( !GetIsPC(oPC)  ||  GetIsDMPossessed(oPC) ) return;
    // If the PC does not have the item "coldprotectarmorlight" equipped.
    if ( sTag != "coldprotectarmorlight" ||
         sTag != "" ||
         sTag != "" ||
         sTag != "" ||
         sTag != "")
    {
        // Cause damage.
        eDamage = EffectDamage(1, DAMAGE_TYPE_COLD);
        eVFX = EffectVisualEffect(VFX_COM_HIT_FROST);
        ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oPC);
        ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX   , oPC);
    }
}

Modifié par GhostOfGod, 07 octobre 2013 - 09:49 .


#5
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
If you are using Chrome, use a differant browser. I have not found an easy way with Chrome.

#6
UnrealJedi

UnrealJedi
  • Members
  • 113 messages
GoG is correct. Just use the standard form and the script looks perfect. I copied and pasted a script under my topic 'Figurine of Wondrous Power'. (I need help with that script, BTW, as an aside :-)). I pasted it using my Android phone and with Google Chrome.

Thanks GoG.