Derek Posted September 7, 2009 Author Share Posted September 7, 2009 Sadscript has always pissed me off, because it doesn't make sense to me. I found a great script today, the rick rolling one. But I just can't get it to work. It's a /command, so I went to the /command section, and put the script in. It looked like all the other ones, but it still didn't work. (Yes I reloaded them). So could someone let me know how to put this script in correctly?http://www.touchofdeathforums.com/smf/index.php/topic,42299.0.html Link to comment Share on other sites More sharing options...
balliztik1 Posted September 7, 2009 Share Posted September 7, 2009 Post your Commands sub. I'm sure I, or someone, will be able to help. Link to comment Share on other sites More sharing options...
Derek Posted September 7, 2009 Author Share Posted September 7, 2009 Alright, it's got some useless poop in it though.Come to think of it, the level up command never worked either. :/' Executed whenever a slash command is sent to the server.Sub Commands(Index)Dim TextSayDim PlayerIDDim MapNum' Get the command and arguments from the cache.TextSay = Trim(GetVar("Scripts\Command.ini", "TEMP", "Text" & Index))' Split the command into an array. All arguments are seperated by spaces.TextSay = Split(TextSay)Select Case TextSay(0)Case "/testscripts"Call TestMain(Index)Exit SubCase "/help"Call PlayerMsg(Index, "Social Commands:", WHITE)Call PlayerMsg(Index, "'msghere = Broadcast Message", WHITE)Call PlayerMsg(Index, "-msghere = Emote Message", WHITE)Call PlayerMsg(Index, "!namehere msghere = Player Message", WHITE)Call PlayerMsg(Index, "Available Commands: /help, /info, /who, /fps, /inv, /stats, /train, /party, /join, /leave, /refresh", WHITE)Exit SubCase "/calladmins"If GetPlayerAccess(Index) = 0 ThenCall AdminMsg(GetPlayerName(Index) & " needs your help!", BRIGHTGREEN)ElseCall PlayerMsg(Index, "You are an admin! You cannot call for help!", BRIGHTGREEN)End IfExit SubCase "/RollRick" color = Rand(0, 15) Call PlayerMsg(Index, "We're no strangers to love", color) color = Rand(0, 15) Call PlayerMsg(Index, "You know the rules and so do I", color) color = Rand(0, 15) Call PlayerMsg(Index, "A full commitment's what I'm thinking of", color) color = Rand(0, 15) Call PlayerMsg(Index, "You wouldn't get this from any other guy", color) color = Rand(0, 15) Call PlayerMsg(Index, " ", $color) Call PlayerMsg(Index, "I just wanna tell you how I'm feeling", color) color = Rand(0, 15) Call PlayerMsg(Index, "Gotta make you understand", color) color = Rand(0, 15) Call PlayerMsg(Index, " ", color) Call PlayerMsg(Index, "Never gonna give you up, never gonna let you down", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna run around and desert you", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna make you cry, never gonna say goodbye", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna tell a lie and hurt you", color) color = Rand(0, 15) Call PlayerMsg(Index, " ", color) Call PlayerMsg(Index, "We've known each other for so long", WHITE) color = Rand(0, 15) Call PlayerMsg(Index, "Your heart's been aching but you're too shy to say it", color) color = Rand(0, 15) Call PlayerMsg(Index, "Inside we both know what's been going on", color) color = Rand(0, 15) Call PlayerMsg(Index, "We know the game and we're gonna play it", color) color = Rand(0, 15) Call PlayerMsg(Index, " ", color) Call PlayerMsg(Index, "And if you ask me how I'm feeling", color) color = Rand(0, 15) Call PlayerMsg(Index, "Don't tell me you're too blind to see", color) color = Rand(0, 15) Call PlayerMsg(Index, "", color) Call PlayerMsg(Index, "Never gonna give you up, never gonna let you down", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna run around and desert you", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna make you cry, never gonna say goodbye", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna tell a lie and hurt you", color) Exit SubCase "/admin"If GetPlayerAccess(Index) > 0 ThenCall PlayerMsg(Index, "Social Commands:", WHITE)Call PlayerMsg(Index, """msghere = Global Admin Message", WHITE)Call PlayerMsg(Index, "=msghere = Private Admin Message", WHITE)Call PlayerMsg(Index, "Available Commands: /admin, /loc, /mapeditor, /warpmeto, /warptome, /warpto, /setsprite, /mapreport, /kick, /ban, /edititem, /respawn, /editnpc, /motd, /editshop, /ban, /editspell", WHITE)End IfExit SubCase "/warpmeto"If GetPlayerAccess(Index) > 0 ThenPlayerID = FindPlayer(TextSay(1))If PlayerID > 0 ThenCall PlayerWarp(Index, GetPlayerMap(PlayerID), GetPlayerX(PlayerID), GetPlayerY(PlayerID))Call PlayerMsg(Index, "You have been warped to " & GetPlayerName(PlayerID) & ".", BROWN)ElseCall PlayerMsg(Index, "Player is not online.", WHITE)End IfEnd IfExit Sub Case "/warptome"If GetPlayerAccess(Index) > 0 ThenPlayerID = FindPlayer(TextSay(1))If PlayerID > 0 ThenCall PlayerWarp(PlayerID, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index))Call PlayerMsg(PlayerID, "You have been warped to " & GetPlayerName(Index) & ".", BROWN)ElseCall PlayerMsg(Index, "Player is not online.", WHITE)End IfEnd IfExit Sub Case "/levelup" If GetPlayerAccess(Index) > 0 Then PlayerID = FindPlayer(TextSay(2)) level = TextSay(1) Call SetPlayerLevel(PlayerID, GetPlayerLevel(PlayerID) + level ) Call SendPlayerData(PlayerID) End Ifcase "/setupshop"inThere = GetVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "InStep")if inThere = 0 Thenexit subend ifif inThere = 1 Thenshophave = GetVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "running")if shophave = "" ThenCall PutVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "running", 0)call playermsg(Index, "Try again.", 12)end ifif shophave = 1 ThenCall PlayerMsg(Index, "You already have a shop running!!", 12)exit subend if'call playermsg(Index, GetPlayerMap(index), 12)Call PutVar("accounts\Shops\" & "setup.ini", "setup", GetPlayerX(index) & GetPlayerY(index) & GetPlayerMap(index) & "Taken", 1)Call PutVar("accounts\Shops\" & "setup.ini", "setup", GetPlayerX(index) & GetPlayerY(index) & GetPlayerMap(index) & "name", GetPlayerName(index))Call PutVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "running", 1)Call PlayerMsg(Index, "Shop is setup.", 12)end ifexit subcase "/closeshop"tileGet = GetVar("accounts\Shops\" & "setup" & ".ini", "setup", GetPlayerX(index) & GetPlayerY(index) & GetPlayerMap(index) & "Taken") 'taken or nottileGet2 = GetVar("accounts\Shops\" & "setup" & ".ini", "setup", GetPlayerX(index) & GetPlayerY(index) & GetPlayerMap(index) & "name") 'name of the step ingetTile2 = GetVar("accounts\Shops\" & "setup" & ".ini", "setup", GetPlayerX(index) & GetPlayerY(index) & GetPlayerMap(index) & "name") 'name of the step in'call playermsg(index, tileGet, 12)if tileGet = "" ThenCall PlayerMsg(Index, "This shop is not even opened!!", 12)exit subend ifif tileGet = "0" ThenCall PlayerMsg(Index, "This shop is not even opened!!", 12)exit subend ifIf tileGet = 1 ThenIf GetPlayerName(index) = tileGet2 ThenCall PlayerMsg(index, "You have closed your shop.", 12)Call PutVar("accounts\Shops\" & "setup.ini", "setup", GetPlayerX(index) & GetPlayerY(index) & GetPlayerMap(index) & "Taken", 0)Call PutVar("accounts\Shops\" & "setup.ini", "setup", GetPlayerX(index) & GetPlayerY(index) & GetPlayerMap(index) & "name", "none")Call PutVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "running", 0)Call PutVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "ismade", 0)Call PutVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "desc", "NONE") Do While c <= 24Call PutVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "slot" & c, 0) C = C + 1 Loop C = 1 Do While c <= 25Call PutVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "slot" & c, 50)Call PutVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "slotvalue" & c, 0)Call PutVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "slotprice" & c, 0) C = C + 1 Loop'exit subelse'call playermsg(Index, "not ur shop.", 12)gaySs = 0'HUGE SCRIPT ALERTmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 1)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 2)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 3)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 4)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 5)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 6)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 7)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 8)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 9)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 10)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 11)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 12)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 13)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 14)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 15)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 16)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 17)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 18)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 19)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 20)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 21)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 22)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 23)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 24)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 25)if mySs = 50 ThengaySs = gaySs + 1end ifif gaySs = 25 ThenCall PlayerMsg(index, "Done closing shop.", 12)Call PutVar("accounts\Shops\" & getTile2 & ".ini", "shop", "running", 0)Call PutVar("accounts\Shops\" & "setup.ini", "setup", GetPlayerX(index) & GetPlayerY(index) & GetPlayerMap(index) & "Taken", 0)Call PutVar("accounts\Shops\" & "setup.ini", "setup", GetPlayerX(index) & GetPlayerY(index) & GetPlayerMap(index) & "name", "none")Call PutVar("accounts\Shops\" & getTile2 & ".ini", "shop", "running", 0)Call PutVar("accounts\Shops\" & getTile2 & ".ini", "shop", "desc", "NONE") Do While c <= 24Call PutVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & c, 0) C = C + 1 Loop C = 1 Do While c <= 25Call PutVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & c, 50)Call PutVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slotvalue" & c, 0)Call PutVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slotprice" & c, 0) C = C + 1 Loopelsecall playermsg(Index, "The shop has some items in it.", 12)end ifend ifend ifexit subcase "/editmyshop"Call CustomMenuShow(index, "shop2", "\GUI\CUSTOM\playershop.bmp", 1)Call CustomMenuLabel(index, 1, "Please input item # you want to sell:", 69, 21, 8, 2, 0, 400, 20) call CustomMenuTextBox(Index, 1, 250, 35, 59, "")Call CustomMenuLabel(index, 2, "Player Shops made by FAISAL (MYSRO)", 21,408, 8, 3, 0, 320, 320)exit subcase "/price"iNum = TextSay(1) iPrice = TextSay(2)if iNum < 0 thencall playermsg(index, "Can't find item.", 12)exit subend ifif iPrice >= 2000000000 ThenCall PlayerMsg(Index, "Error: Max price is 2000000000", 12)exit subend ifif iPrice <= 0 ThenCall PlayerMsg(index, "Can not price the item 0 or lower.", 12)exit sub end ifif iNum >= 25 Thencall playermsg(Index, "Doesn't even exist.", 12)exit subend ifshopismade = GetVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "ismade")if shopismade = 1 Thencall playermsg(Index, "Shop exists.", 12)itemExist = GetVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "slot" & iNum)'call playermsg(index, iPrice, 12)If itemExist = 0 Thencall playermsg(Index, "The item # you have entered doesn't exist.", 12)exit subelseCall PutVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "slotprice" & iNum, "" & iPrice)Call PlayerMsg(index, "Priced: " & getitemname(itemExist) & " as " & iPrice & " Gold!", 12)end ifelsecall playermsg(index, "Sorry you need a shop!", 12)end ifexit sub case "/shopdesc"desc2 = TextSay(1)shopismade = GetVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "ismade") if shopismade = 0 then call playermsg(Index, "You need a shop!", 12) exit sub end ifCall PutVar("accounts\Shops\" & GetPlayerName(index) & ".ini", "shop", "desc", "" & desc2)Call PlayerMsg(Index, "Added description as: " & desc2 & ".", 12)Call PlayerMsg(Index, "Make-sure-you-added-the-description-like-this-or-it-wont work.", 12)exit subCase "/warpto"If GetPlayerAccess(Index) > 0 ThenMapNum = TextSay(1)If MapNum > 0 And MapNum <= MAX_MAPS ThenCall PlayerWarp(Index, MapNum, GetPlayerX(Index), GetPlayerY(Index))Call PlayerMsg(Index, "You have been warped to map #" & MapNum & ".", BRIGHTBLUE)ElseCall PlayerMsg(Index, "Invalid map number.", BRIGHTRED)End IfEnd IfExit SubEnd SelectCall PlayerMsg(Index, "That is not a valid command.", BRIGHTRED)End Sub' Executes on death, dropping all of the players items.Sub DropItems(Index)' Remove this to enable.Exit SubIf GetPlayerWeaponSlot(Index) > 0 Then Call PlayerMapDropItem(Index, GetPlayerWeaponSlot(Index), 0)End IfIf GetPlayerArmorSlot(Index) > 0 Then Call PlayerMapDropItem(Index, GetPlayerArmorSlot(Index), 0)End IfIf GetPlayerHelmetSlot(Index) > 0 Then Call PlayerMapDropItem(Index, GetPlayerHelmetSlot(Index), 0)End IfIf GetPlayerShieldSlot(Index) > 0 Then Call PlayerMapDropItem(Index, GetPlayerShieldSlot(Index), 0)End IfIf GetPlayerLegsSlot(Index) > 0 Then Call PlayerMapDropItem(Index, GetPlayerLegsSlot(Index), 0)End IfIf GetPlayerRingSlot(Index) > 0 Then Call PlayerMapDropItem(Index, GetPlayerRingSlot(Index), 0)End IfIf GetPlayerNecklaceSlot(Index) > 0 Then Call PlayerMapDropItem(Index, GetPlayerNecklaceSlot(Index), 0)End IfEnd Sub Link to comment Share on other sites More sharing options...
balliztik1 Posted September 7, 2009 Share Posted September 7, 2009 Well, there's nothing wrong here. It must be an error elsewhere above this. Link to comment Share on other sites More sharing options...
Derek Posted September 7, 2009 Author Share Posted September 7, 2009 You think you could find it, please?http://rapidshare.com/files/276939407/Main.txt.html Link to comment Share on other sites More sharing options...
balliztik1 Posted September 7, 2009 Share Posted September 7, 2009 Hmm…found no errors. Interesting, the Sadscript editor found nothing, but there's a quite blatant one.Call LoadInternet( Index, i haz rik rollz/lol/")That line, due to the word filter, would mess up your main.txt. Weird how the editor didn't find it. Oh well. ScriptErrors=1 in the server seems to work much better. Link to comment Share on other sites More sharing options...
Derek Posted September 7, 2009 Author Share Posted September 7, 2009 Turning "ScriptErrors" on didn't really do anything except make a bunch of pop-ups come up… I don't really know what that does. Link to comment Share on other sites More sharing options...
Admiral Refuge Posted September 7, 2009 Share Posted September 7, 2009 @Derek.:> Turning "ScriptErrors" on didn't really do anything except make a bunch of pop-ups come up… I don't really know what that does.The popups say what the errors are, and where in the main.txt they are.Either way, go down your script and change all instances of:```i haz rik rollz/lol/"```to:```"http://www.youtube.com/watch?v=oHg5SJYRHA0"```(make sure you include quotes)Sadscript is very easy, just take some time to read afew tutorials; I'd recommend these two set (have notepad open the whole time ;)):http://www.touchofdeathforums.com/smf/index.php/topic,40682.0.htmlhttp://www.touchofdeathforums.com/smf/index.php/topic,40746.0.htmlhttp://www.touchofdeathforums.com/smf/index.php/topic,39867.0.htmlhttp://www.touchofdeathforums.com/smf/index.php/topic,42156.0.htmlThen check out Godlord's tutorials. This stuff will end up being second nature ;) Link to comment Share on other sites More sharing options...
Derek Posted September 7, 2009 Author Share Posted September 7, 2009 What I'm confused about, is that I can't find i haz rik rollz/lol/" anywhere in the script. Link to comment Share on other sites More sharing options...
balliztik1 Posted September 7, 2009 Share Posted September 7, 2009 @Derek.:> What I'm confused about, is that I can't find i haz rik rollz/lol/" anywhere in the script.I might not have typed that exactly. I deleted it out of the main.txt you sent me before I posted this. Might be different spelling. I know that the "/lol/" part was there, though. Let me find the exact text.> i has rik rollz/lol/"My bad, it was "has", not "haz". Link to comment Share on other sites More sharing options...
Derek Posted September 7, 2009 Author Share Posted September 7, 2009 Maybe I'm a little lost. I don't have that line in my main.txt. I know what you're talking about, but if you look at the example above, I don't have it in there. And I don't know where I'd put it. This: doesn't work:Case "/RollRick" color = Rand(0, 15) Call PlayerMsg(Index, "We're no strangers to love", color) color = Rand(0, 15) Call PlayerMsg(Index, "You know the rules and so do I", color) color = Rand(0, 15) Call PlayerMsg(Index, "A full commitment's what I'm thinking of", color) color = Rand(0, 15) Call PlayerMsg(Index, "You wouldn't get this from any other guy", color) color = Rand(0, 15) Call PlayerMsg(Index, " ", $color) Call PlayerMsg(Index, "I just wanna tell you how I'm feeling", color) color = Rand(0, 15) Call PlayerMsg(Index, "Gotta make you understand", color) color = Rand(0, 15) Call PlayerMsg(Index, " ", color) Call PlayerMsg(Index, "Never gonna give you up, never gonna let you down", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna run around and desert you", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna make you cry, never gonna say goodbye", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna tell a lie and hurt you", color) color = Rand(0, 15) Call PlayerMsg(Index, " ", color) Call PlayerMsg(Index, "We've known each other for so long", WHITE) color = Rand(0, 15) Call PlayerMsg(Index, "Your heart's been aching but you're too shy to say it", color) color = Rand(0, 15) Call PlayerMsg(Index, "Inside we both know what's been going on", color) color = Rand(0, 15) Call PlayerMsg(Index, "We know the game and we're gonna play it", color) color = Rand(0, 15) Call PlayerMsg(Index, " ", color) Call PlayerMsg(Index, "And if you ask me how I'm feeling", color) color = Rand(0, 15) Call PlayerMsg(Index, "Don't tell me you're too blind to see", color) color = Rand(0, 15) Call PlayerMsg(Index, "", color) Call PlayerMsg(Index, "Never gonna give you up, never gonna let you down", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna run around and desert you", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna make you cry, never gonna say goodbye", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna tell a lie and hurt you", color) Exit Sub Case "/RollRick" Call LoadInternet("http://www.youtube.com/watch?v=oHg5SJYRHA0") Exit Sub Link to comment Share on other sites More sharing options...
Ruins of Hell Posted September 7, 2009 Share Posted September 7, 2009 > Case "/RollRick"> Call LoadInternet(index,"http://www.youtube.com/watch?v=oHg5SJYRHA0")> Exit SubRemember the basics. Link to comment Share on other sites More sharing options...
Derek Posted September 7, 2009 Author Share Posted September 7, 2009 @The:> index,still nothing.btw, wanna trade Internets? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted September 8, 2009 Share Posted September 8, 2009 Call PlayerMsg(Index, " ", $color)Somebody's doing a little too much PHPAnd BTW: yeah. Link to comment Share on other sites More sharing options...
JayT Posted September 8, 2009 Share Posted September 8, 2009 dam i just saw that aswell ;) nvm. nice 1 soul :) Link to comment Share on other sites More sharing options...
Derek Posted September 8, 2009 Author Share Posted September 8, 2009 Lol, I'm unbelievably lost right now. This script doesn't seem like it should be this hard. Link to comment Share on other sites More sharing options...
Godlord Posted September 8, 2009 Share Posted September 8, 2009 ```gaySs = 0'HUGE SCRIPT ALERTmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 1)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 2)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 3)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 4)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 5)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 6)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 7)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 8)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 9)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 10)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 11)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 12)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 13)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 14)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 15)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 16)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 17)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 18)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 19)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 20)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 21)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 22)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 23)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 24)if mySs = 50 ThengaySs = gaySs + 1end ifmySs = GetVar("accounts\Shops\" & getTile2 & ".ini", "shop", "slot" & 25)if mySs = 50 ThengaySs = gaySs + 1end if```Eh right…```For Slot = 1 To 25 If GetVar("Accounts\Shops\" & getTile2 & ".ini", "Shop", "Slot" & Slot) <> vbNullString And CInt(GetVar("Accounts\Shops\" & getTile2 & ".ini", "Shop", "Slot" & Slot)) = 50 Then Count = Count + 1 End IfNext`````` color = Rand(0, 15) Call PlayerMsg(Index, "We're no strangers to love", color) color = Rand(0, 15) Call PlayerMsg(Index, "You know the rules and so do I", color) color = Rand(0, 15) Call PlayerMsg(Index, "A full commitment's what I'm thinking of", color) color = Rand(0, 15) Call PlayerMsg(Index, "You wouldn't get this from any other guy", color) color = Rand(0, 15) Call PlayerMsg(Index, " ", $color) Call PlayerMsg(Index, "I just wanna tell you how I'm feeling", color) color = Rand(0, 15) Call PlayerMsg(Index, "Gotta make you understand", color) color = Rand(0, 15) Call PlayerMsg(Index, " ", color) Call PlayerMsg(Index, "Never gonna give you up, never gonna let you down", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna run around and desert you", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna make you cry, never gonna say goodbye", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna tell a lie and hurt you", color) color = Rand(0, 15) Call PlayerMsg(Index, " ", color) Call PlayerMsg(Index, "We've known each other for so long", WHITE) color = Rand(0, 15) Call PlayerMsg(Index, "Your heart's been aching but you're too shy to say it", color) color = Rand(0, 15) Call PlayerMsg(Index, "Inside we both know what's been going on", color) color = Rand(0, 15) Call PlayerMsg(Index, "We know the game and we're gonna play it", color) color = Rand(0, 15) Call PlayerMsg(Index, " ", color) Call PlayerMsg(Index, "And if you ask me how I'm feeling", color) color = Rand(0, 15) Call PlayerMsg(Index, "Don't tell me you're too blind to see", color) color = Rand(0, 15) Call PlayerMsg(Index, "", color) Call PlayerMsg(Index, "Never gonna give you up, never gonna let you down", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna run around and desert you", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna make you cry, never gonna say goodbye", color) color = Rand(0, 15) Call PlayerMsg(Index, "Never gonna tell a lie and hurt you", color) Exit Sub```:huh:``` Dim TextIndex TextIndex = 1 Do While GetVar("RollRick.ini", "Lyrics", "Rule" & TextIndex) <> vbNullString Color = Rand(0, 15) Call PlayerMsg(Index, GetVar("RollRick.ini", "Lyrics", "Rule" & TextIndex), Color) TextIndex = TextIndex + 1 Loop Exit Sub```I'm not even dealing with the rest, please learn Sadscript before making something huge like this.@Balliztik1:> Hmm…found no errors. Interesting, the Sadscript editor found nothing, but there's a quite blatant one.> > Call LoadInternet( Index, i haz rik rollz/lol/")> > That line, due to the word filter, would mess up your main.txt. Weird how the editor didn't find it. Oh well. ScriptErrors=1 in the server seems to work much better.That's why I don't use the Sadscript Editor.Regards, Godlord. Link to comment Share on other sites More sharing options...
Sigait Posted September 8, 2009 Share Posted September 8, 2009 @Godlord:> That's why I don't use the Sadscript Editor.> > Regards,> Godlord.Hmm me niether…Sigait. Link to comment Share on other sites More sharing options...
Diskmaster Posted September 10, 2009 Share Posted September 10, 2009 W8 a minute, where is color defined ANYWHERE!!!!! shouldn't it be dimmed at the top, so, like this:```' Executed whenever a slash command is sent to the server.Sub Commands(Index) Dim TextSay Dim PlayerID Dim MapNum Dim color```I just want to point out the Dim color, otherwise it should go at the very beginning of the rolled rick slash command (or you could set color = Rand(1,15) at the very beginning of the slash commands sub!?! But, cmon, no one noticed the lack of dimming? Link to comment Share on other sites More sharing options...
Owen F Posted September 10, 2009 Share Posted September 10, 2009 can i point out in godlords code, to you Diskmaster,this:> # Dim TextIndex > > TextIndex = 1 > > Do While GetVar("RollRick.ini", "Lyrics", "Rule" & TextIndex) <> vbNullString > **Color = Rand(0, 15)** > Call PlayerMsg(Index, GetVar("RollRick.ini", "Lyrics", "Rule" & TextIndex), Color) > TextIndex = TextIndex + 1 > Loop > > Exit Subits defined… Link to comment Share on other sites More sharing options...
Diskmaster Posted September 11, 2009 Share Posted September 11, 2009 oh, ok, but I am just saying, wouldn't telling Derek to dim the beginning of this solve all of our previous problems (u can't just put some random word in the script and expect it to still work without dimming it) Link to comment Share on other sites More sharing options...
Owen F Posted September 11, 2009 Share Posted September 11, 2009 why not ?X = 1Do While X <= 100Call PlayerMsg(index,"lolz i win",0)loop Link to comment Share on other sites More sharing options...
balliztik1 Posted September 11, 2009 Share Posted September 11, 2009 You only need to dim arrays in Sadscript.For instance:```x = 5Call PlayerMsg(index, Cstr(x), BLACK)```Works, but this:```x(1) = 5Call PlayerMsg(index, Cstr(x(1)), BLACK)```Does not. You'd have to dim it like so:```Dim x(#)```Where # is greater than or equal to 1. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now