Pasketi Posted June 4, 2009 Author Share Posted June 4, 2009 Okay, now my sailing script is:```Sub ScriptedTile(Index, Script) Select Case Script Case 0 Call PlayerMsg(Index, "This scripted tile has no apparent use.", WHITE) Exit SubCase 2 If CanTake(Index, 3, 1) = False Then Call PlayerMsg(index, "You have not permissions to board the ship! You need a ship!", 4) Call PlayerWarp(index, 1, 3, 17) Else If int(GetPlayerSprite(index)) <> 80 Then Call PutVar("accounts\" & GetPlayerLogin(index) &".ini", "CHAR" & GetPlayerCharNum(index), "noboat", GetPlayerSprite(index)) Call SetPlayerSprite(index, 80) Call PlayerMsg(index, "You begin to set sail from isle Gordas.", 2) Call PlayerWarp(index, 10, 25, 15) Call SetPlayerSTR(Index, GetPlayerSTR(Index) + 50) Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 50) Call SendPlayerData(index) End If End IfCase 3 Dim Sprite Sprite = int(GetVar("accounts\" & GetPlayerLogin(index) &".ini", "CHAR" & GetPlayerCharNum(index), "noboat")) If int(GetPlayerSprite(index)) = 80 Then Call SetPlayerSprite(index, Sprite) Call PlayerMsg(index, "You have docked to Isle Gordas.", 2) Call PlayerWarp(index, 1, 1, 17) Call SetPlayerSTR(Index, GetPlayerSTR(Index) - 50) Call SetPlayerDEF(Index, GetPlayerDEF(Index) - 50) Call SendPlayerData(index) Else Call PlayerMsg(index, "Step onto the water to begin sailing", 2) End IfCase 4 If CanTake(Index, 3, 1) = False Then Call PlayerMsg(index, "You have not permissions to board the ship! You need a ship!", 4) Call PlayerWarp(index, 1, 3, 17) Else If int(GetPlayerSprite(index)) <> 80 Then Call PutVar("accounts\" & GetPlayerLogin(index) &".ini", "CHAR" & GetPlayerCharNum(index), "noboat", GetPlayerSprite(index)) Call SetPlayerSprite(index, 80) Call PlayerMsg(index, "You begin to set sail from Savage Isle.", 2) Call PlayerWarp(index, 10, 18, 13) Call SetPlayerSTR(Index, GetPlayerSTR(Index) + 50) Call SetPlayerDEF(Index, GetPlayerDEF(Index) + 50) Call SendPlayerData(index) End If End IfCase 5 Sprite = int(GetVar("accounts\" & GetPlayerLogin(index) &".ini", "CHAR" & GetPlayerCharNum(index), "noboat")) If int(GetPlayerSprite(index)) = 80 Then Call SetPlayerSprite(index, Sprite) Call PlayerMsg(index, "You have docked to Savage Isle.", 2) Call PlayerWarp(index, 25, 15, 27) Call SetPlayerSTR(Index, GetPlayerSTR(Index) - 50) Call SetPlayerDEF(Index, GetPlayerDEF(Index) - 50) Call SendPlayerData(index) Else Call PlayerMsg(index, "Step onto the water to begin sailing", 2) End If Case Else Call PlayerMsg(Index, "No tile script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End SelectEnd Sub```And:```Sub OnDeath(Index) Dim MapNum Dim ClassID Dim X Dim Y Dim Sprite Sprite = int(GetVar("accounts\" & GetPlayerLogin(index) &".ini", "CHAR" & GetPlayerCharNum(index), "noboat")) If GetPlayerMap(Index)=10 then Call SetPlayerSTR(Index, GetPlayerSTR(Index) - 50) Call SetPlayerDEF(Index, GetPlayerDEF(Index) - 50) If int(GetPlayerSprite(index)) = 80 Then Call SetPlayerSprite(index, Sprite) Call PlayerMsg(index, "Your ship sunk and you have been washed to the sore.", 2) Else End If End If If GetMapBootMap(Index) > 0 Then Call PlayerWarp(Index, GetMapBootMap(Index), GetMapBootX(Index), GetMapBootY(Index)) Else ClassID = GetPlayerClass(Index) MapNum = GetVar("Classes\Class" & ClassID & ".ini", "CLASS", "Map") X = GetVar("Classes\Class" & ClassID & ".ini", "CLASS", "x") Y = GetVar("Classes\Class" & ClassID & ".ini", "CLASS", "y") Call PlayerWarp(Index, MapNum, X, Y) End IfEnd Sub```Now i'd like to remove players equipment and prevent him to put them back on at sea (map nr 10) Except the cannon (hmm… let's say item number 30, prevented on land, allowed on map number 10=sea). I'd like also to prevent all spells except "Explode ammo" (It would be prevented to cast on land how? spell number... 10)How would you do it? I got the inventoryscript installed...EDIT: also it would be much appreciated, if someone told me how i can use more than one ship.Advanced:Select Case'Light SloopCase 1If Can_take(Index, 3, 1) then*Sailing script'GalleonCase 2If Can_take(Index, 50, 1) then*Modified sailing scriptSo how can i get Galleon above the other ship? If i got both boarding permissions but i want to only use the better one, how should i do it.All should be in Sub ScriptedTile Link to comment Share on other sites More sharing options...
bluedude Posted June 4, 2009 Share Posted June 4, 2009 WOW. Link to comment Share on other sites More sharing options...
Pasketi Posted June 4, 2009 Author Share Posted June 4, 2009 Yes i know, it's wow, but i still need help. Bottom lines tell my need. Link to comment Share on other sites More sharing options...
DarkMazer Posted June 4, 2009 Share Posted June 4, 2009 For the multiple ships thing, you can just do this:Case 1If [the player has permissions for galleon] Then'modified sailing scriptElseIf [the player has permissions for light sloop] Then'sailing scriptEnd IfYou only need 1 case to make it work. Also, note ElseIf is one word.For items, you can just take everything away from the player's inventory (remember to save it to a .ini file), except the cannon, and give it back when the player steps onto land. For spells, you could do something similar. I'll leave it to you to figure out the exact code, since you seem competent. Link to comment Share on other sites More sharing options...
Pasketi Posted June 4, 2009 Author Share Posted June 4, 2009 :huh: What if i want **9 different ship types**. This doesn't work then, does it? Link to comment Share on other sites More sharing options...
Bobosk Posted June 4, 2009 Share Posted June 4, 2009 well…you can always design a custom menu, letting your player PICK which ship they want to use(if they have it) Link to comment Share on other sites More sharing options...
Pasketi Posted June 4, 2009 Author Share Posted June 4, 2009 ProsThat would be FANTASTIC!!!!!ConsI can't do it. (can't do VB yet)plusCan it be done with sadscript?EDIT:How it can be done?EDIT2:What's the script? Link to comment Share on other sites More sharing options...
Bobosk Posted June 4, 2009 Share Posted June 4, 2009 Custom Menus are sadscript…[http://www.touchofdeathforums.com/smf/index.php?topic=8502.0](http://www.touchofdeathforums.com/smf/index.php?topic=8502.0) search "custommenu" Link to comment Share on other sites More sharing options...
Pasketi Posted June 4, 2009 Author Share Posted June 4, 2009 Is there a up to date tutorial? How can i add buttons there and what are the value for them? Is it easy to do a custom menu? 1-5? please details! I'm… 2-3/5, can i do it in... let's say... 3-4 hours?EDIT: Don't forget my first request:@Pasketi:> Now i'd like to remove players equipment and prevent him to put them back on at sea (map nr 10) Except the cannon (hmm… let's say item number 30, prevented on land, allowed on map number 10=sea). I'd like also to prevent all spells except "Explode ammo" (It would be prevented to cast on land how? spell number... 10)> > How would you do it? I got the inventoryscript installed... Link to comment Share on other sites More sharing options...
Bobosk Posted June 4, 2009 Share Posted June 4, 2009 [http://www.touchofdeathforums.com/smf/index.php/topic,7458.0.html](http://www.touchofdeathforums.com/smf/index.php/topic,7458.0.html)and somebody already suggested something for that, try pursuing it.. Link to comment Share on other sites More sharing options...
Pasketi Posted June 5, 2009 Author Share Posted June 5, 2009 :huh: When?? and can you give me the links, because i don't know what i'm looking for in english?And i'll try with that tutorial… I'll post if i screw something up :)EDIT: Dear, i'm blind!!But... well i'll try first :icon_crap: Link to comment Share on other sites More sharing options...
Owen F Posted June 5, 2009 Share Posted June 5, 2009 Instead of asking a tonne of questions like so:@Pasketi:> Is there a up to date tutorial? How can i add buttons there and what are the value for them? Is it easy to do a custom menu? 1-5? please details! I'm… 2-3/5, can i do it in... let's say... 3-4 hours?> EDIT: Don't forget my first request:Ask one question. When you finish it, ask another question, NO ONE will really help if they just see onslaught after onslaught of questions…i know i wouldnt. Link to comment Share on other sites More sharing options...
Pasketi Posted June 5, 2009 Author Share Posted June 5, 2009 Ok…. But i got it now. FREAKING MUCH CODE FOR 9 BOATS °__° I need to make a template for future islands :lipsrsealed:But the first question is still open. @DarkMazer:> For items, you can just take everything away from the player's inventory **(remember to save it to a .ini file)**, except the cannon, and give it back when the player steps onto land. For spells, you could do something similar. > > I'll leave it to you to figure out the exact code, since you seem competent.The problem here is i haven't got a clue how would i do it. Yes, inventory is good, but the enemy ships drop items/currency, so they…. wait, can i make a secondary bag for sailing-items? or do i need to know VB for that? I need details, or i can't do it.Please....Questions open:Item equip prevention on particular mapsSpell usage prevention on particular mapsQuestions solved:More ships/custom Menu 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