kuroda Posted February 27, 2009 Author Share Posted February 27, 2009 i use this script but i dont know how doesnt work :SSub ScriptedTile(index)case 0 GetPlayerLevel(index) If PlayerLevel(index) > 6 thenCall BlockPlayer(index)Call PlayerMsg(index, "[Attention]Your not the right level to enter this area",7)Else If PlayerLevel(index) < 6 thencall playermsg(index, "welcome to the level 6+ area", 4)end ifend ifend sub Link to comment Share on other sites More sharing options...
Anna Comnena Posted February 27, 2009 Share Posted February 27, 2009 I don't think the GetPlayerLevel(index) does anything by itself, since the value is not being assigned to anything.Why not try If GetPlayerLevel(index) > 6 then ? Link to comment Share on other sites More sharing options...
Dark_Marine_123 Posted February 27, 2009 Share Posted February 27, 2009 Try removing the unneeded line break between "[Attention]Your not the right level to enter this area",7)"Also you dont need that extra If then for the enter 6+ area, not to mention you have > and < in the wrong spots Link to comment Share on other sites More sharing options...
cheatking Posted February 27, 2009 Share Posted February 27, 2009 ```Sub ScriptedTile(index) Case 0 If GetPlayerLevel(index) > 6 Then Call BlockPlayer(index) ' I'm not shure if that will work. Call PlayerMsg(index, "[Attention]Your not the right level to enter this area", 7) Else If GetPlayerLevel(index) < 6 Then Call PlayerMsg(index, "welcome to the level 6+ area", 4) End If End IfEnd Sub```Try that. Link to comment Share on other sites More sharing options...
Dark_Marine_123 Posted February 27, 2009 Share Posted February 27, 2009 @[NW:> [CUBE] Sean link=topic=39585.msg385413#msg385413 date=1235758385]> ```> Sub ScriptedTile(index)> Case 0> If GetPlayerLevel(index) > 6 Then> Call BlockPlayer(index) ' I'm not shure if that will work.> Call PlayerMsg(index, "[Attention]Your not the right level to enter this area", 7)> Else> If GetPlayerLevel(index) < 6 Then> Call PlayerMsg(index, "welcome to the level 6+ area", 4)> End If> End If> End Sub> ```Try that.Wont work.If GetPlayerLevel is LESS THAN 6 thenWelcome to the 6+ area? Link to comment Share on other sites More sharing options...
kuroda Posted February 27, 2009 Author Share Posted February 27, 2009 i think i have a problem with the server or client, when i put the code on my main.txt the server dont load it. i use the "Script" atribute and script nº0 to load that but nothing happens :S Link to comment Share on other sites More sharing options...
Dark_Marine_123 Posted February 27, 2009 Share Posted February 27, 2009 The client defently works for scripted tiles.Make sure you reload your script, make sure you actually walk onto the tile Link to comment Share on other sites More sharing options...
kuroda Posted February 27, 2009 Author Share Posted February 27, 2009 yeah, i try it but nothing im getting mad :angry: Link to comment Share on other sites More sharing options...
kuroda Posted February 27, 2009 Author Share Posted February 27, 2009 so nop, the script didnt work :sad: Link to comment Share on other sites More sharing options...
kuroda Posted February 27, 2009 Author Share Posted February 27, 2009 i tryed another scripts and works but not for lvl block… :( Link to comment Share on other sites More sharing options...
Fulou Posted February 27, 2009 Share Posted February 27, 2009 Give this a whirl, havent tested since i havent got Eclipse, so back up your main.txt first!```'.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.'Sub ScriptedTile(index)'.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:. Case 0 If GetPlayerLevel(index) > 6 Then Call PlayerMsg(index, "[Attention]Your not the right level to enter this area", 7) Call ReturnPlayer(Index) Else If GetPlayerLevel(index) < 6 Then Call PlayerMsg(index, "welcome to the level 6+ area", 4) End If End IfEnd Sub'.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.Sub ReturnPlayer(Index)'warps player back to previous square'.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.Dim XaddDim YaddXadd = 0Yadd = 0Select Case GetPlayerDir(Index) Case 0 ' up Yadd = -1 Case 1 ' down Yadd = 1 Case 2 ' left Xadd = -1 case 3 ' right Xadd = 1End selectCall PlayerWarp(Index, GetPlayerMap(Index), Int(GetPlayerX(Index) + Xadd), Int(GetPlayerY(Index) + Yadd))End sub``` Link to comment Share on other sites More sharing options...
kuroda Posted February 28, 2009 Author Share Posted February 28, 2009 omg supertnx dude!! but i corrected some errors of the code :D```'.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.'Sub ScriptedTile(index)'.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:. Case 0 If GetPlayerLevel(index) <= 6 Then Call PlayerMsg(index, "[Attention]Your not the right level to enter this area", 7) Call ReturnPlayer(Index) Else If GetPlayerLevel(index) > 6 Then Call PlayerMsg(index, "welcome to the level 6+ area", 4) End If End IfEnd Sub'.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.Sub ReturnPlayer(Index)'warps player back to previous square'.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.:!:.Dim XaddDim YaddXadd = 0Yadd = 0Select Case GetPlayerDir(Index) Case 0 ' up Yadd = 1 Case 1 ' down Yadd = -1 Case 2 ' left Xadd = 1 case 3 ' right Xadd = -1End selectCall PlayerWarp(Index, GetPlayerMap(Index), Int(GetPlayerX(Index) + Xadd), Int(GetPlayerY(Index) + Yadd))End sub```the symbols <, >, -1,1, were oposite :P and i adde <= to lvl 6 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